backend-common: refactor UrlReaders and factories to be centered around predicates

This commit is contained in:
Patrik Oldsberg
2020-10-02 13:36:07 +02:00
parent 0fbe965b43
commit 41d55e8d76
3 changed files with 85 additions and 102 deletions
+34 -45
View File
@@ -67,53 +67,42 @@ kubernetes:
clusterLocatorMethod: 'configMultiTenant'
clusters: []
# This sections configures the URL readers used by various parts of
# Backstage to read data from remote URLs
readers:
byHost:
- type: github
host: github.com
config:
token:
$secret:
env: GITHUB_PRIVATE_TOKEN
integrations:
github:
- host: github.com
token:
$secret:
env: GITHUB_PRIVATE_TOKEN
### Example for how to add your GitHub Enterprise instance using the API:
# - type: github
# host: ghe.example.net
# config:
# apiBaseUrl: https://ghe.example.net/api/v3
# token:
# $secret:
# env: GHE_PRIVATE_TOKEN
# - host: ghe.example.net
# apiBaseUrl: https://ghe.example.net/api/v3
# token:
# $secret:
# env: GHE_PRIVATE_TOKEN
### Example for how to add your GitHub Enterprise instance using raw HTTP fetches (token is optional):
# - type: github
# host: ghe.example.net
# config:
# rawBaseUrl: https://ghe.example.net/raw
# token:
# $secret:
# env: GHE_PRIVATE_TOKEN
- type: gitlab
host: gitlab.com
config:
token:
$secret:
env: GITLAB_PRIVATE_TOKEN
- type: bitbucket
host: bitbucket.org
config:
username:
$secret:
env: BITBUCKET_USERNAME
appPassword:
$secret:
env: BITBUCKET_APP_PASSWORD
- type: azure
host: dev.azure.com
config:
privateToken:
$secret:
env: AZURE_PRIVATE_TOKEN
# - host: ghe.example.net
# rawBaseUrl: https://ghe.example.net/raw
# token:
# $secret:
# env: GHE_PRIVATE_TOKEN
gitlab:
- host: gitlab.com
token:
$secret:
env: GITLAB_PRIVATE_TOKEN
bitbucket:
- host: bitbucket.org
username:
$secret:
env: BITBUCKET_USERNAME
appPassword:
$secret:
env: BITBUCKET_APP_PASSWORD
azure:
- host: dev.azure.com
token:
$secret:
env: AZURE_PRIVATE_TOKEN
catalog:
rules: