move processor config to catalog from backend
This commit is contained in:
+20
-20
@@ -13,26 +13,6 @@ backend:
|
||||
database:
|
||||
client: sqlite3
|
||||
connection: ':memory:'
|
||||
processors:
|
||||
githubApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: GITHUB_PRIVATE_TOKEN
|
||||
bitbucketApi:
|
||||
userName:
|
||||
$secret:
|
||||
env: BITBUCKET_USERNAME
|
||||
appPassword:
|
||||
$secret:
|
||||
env: BITBUCKET_APP_PASSWORD
|
||||
gitlabApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: GITLAB_PRIVATE_TOKEN
|
||||
azureApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: AZURE_PRIVATE_TOKEN
|
||||
|
||||
# See README.md in the proxy-backend plugin for information on the configuration format
|
||||
proxy:
|
||||
@@ -65,6 +45,26 @@ newrelic:
|
||||
key: NEW_RELIC_REST_API_KEY
|
||||
|
||||
catalog:
|
||||
processors:
|
||||
githubApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: GITHUB_PRIVATE_TOKEN
|
||||
bitbucketApi:
|
||||
userName:
|
||||
$secret:
|
||||
env: BITBUCKET_USERNAME
|
||||
appPassword:
|
||||
$secret:
|
||||
env: BITBUCKET_APP_PASSWORD
|
||||
gitlabApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: GITLAB_PRIVATE_TOKEN
|
||||
azureApi:
|
||||
privateToken:
|
||||
$secret:
|
||||
env: AZURE_PRIVATE_TOKEN
|
||||
exampleEntityLocations:
|
||||
github:
|
||||
- https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('AzureApiReaderProcessor', () => {
|
||||
{
|
||||
context: '',
|
||||
data: {
|
||||
backend: {
|
||||
catalog: {
|
||||
processors: {
|
||||
azureApi: {
|
||||
privateToken: token,
|
||||
|
||||
@@ -26,7 +26,7 @@ export class AzureApiReaderProcessor implements LocationProcessor {
|
||||
constructor(config: Config) {
|
||||
this.privateToken =
|
||||
(config.getOptional(
|
||||
'backend.processors.azureApi.privateToken',
|
||||
'catalog.processors.azureApi.privateToken',
|
||||
) as string) ?? '';
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ describe('BitbucketApiReaderProcessor', () => {
|
||||
{
|
||||
context: '',
|
||||
data: {
|
||||
backend: {
|
||||
catalog: {
|
||||
processors: {
|
||||
bitbucketApi: {
|
||||
userName: userName,
|
||||
|
||||
@@ -27,11 +27,11 @@ export class BitbucketApiReaderProcessor implements LocationProcessor {
|
||||
constructor(config: Config) {
|
||||
this.username =
|
||||
(config.getOptional(
|
||||
'backend.processors.bitbucketApi.userName',
|
||||
'catalog.processors.bitbucketApi.userName',
|
||||
) as string) ?? '';
|
||||
this.password =
|
||||
(config.getOptional(
|
||||
'backend.processors.bitbucketApi.appPassword',
|
||||
'catalog.processors.bitbucketApi.appPassword',
|
||||
) as string) ?? '';
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('GithubApiReaderProcessor', () => {
|
||||
{
|
||||
context: '',
|
||||
data: {
|
||||
backend: {
|
||||
catalog: {
|
||||
processors: {
|
||||
githubApi: {
|
||||
privateToken: token,
|
||||
|
||||
@@ -26,7 +26,7 @@ export class GithubApiReaderProcessor implements LocationProcessor {
|
||||
constructor(config: Config) {
|
||||
this.privateToken =
|
||||
(config.getOptional(
|
||||
'backend.processors.githubApi.privateToken',
|
||||
'catalog.processors.githubApi.privateToken',
|
||||
) as string) ?? '';
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('GitlabApiReaderProcessor', () => {
|
||||
{
|
||||
context: '',
|
||||
data: {
|
||||
backend: {
|
||||
catalog: {
|
||||
processors: {
|
||||
gitlabApi: {
|
||||
privateToken: token,
|
||||
|
||||
@@ -26,7 +26,7 @@ export class GitlabApiReaderProcessor implements LocationProcessor {
|
||||
constructor(config: Config) {
|
||||
this.privateToken =
|
||||
(config.getOptional(
|
||||
'backend.processors.gitlabApi.privateToken',
|
||||
'catalog.processors.gitlabApi.privateToken',
|
||||
) as string) ?? '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user