feat: add config schema for rollbar plugins (#3404)

* feat: add config schema for rollbar plugins

* remove rollbar from create-app template
This commit is contained in:
Andrew Thauer
2020-11-26 08:30:12 -05:00
committed by GitHub
parent a5e94905e9
commit 3a201c5d54
9 changed files with 67 additions and 26 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-rollbar': patch
'@backstage/plugin-rollbar-backend': patch
---
Add config schema for the rollbar & rollbar-backend plugins
-5
View File
@@ -64,11 +64,6 @@ techdocs:
sentry:
organization: my-company
rollbar:
organization: my-company
accountToken:
$env: ROLLBAR_ACCOUNT_TOKEN
lighthouse:
baseUrl: http://localhost:3003
@@ -25,7 +25,6 @@
"@backstage/plugin-auth-backend": "^{{version '@backstage/plugin-auth-backend'}}",
"@backstage/plugin-catalog-backend": "^{{version '@backstage/plugin-catalog-backend'}}",
"@backstage/plugin-proxy-backend": "^{{version '@backstage/plugin-proxy-backend'}}",
"@backstage/plugin-rollbar-backend": "^{{version '@backstage/plugin-rollbar-backend'}}",
"@backstage/plugin-scaffolder-backend": "^{{version '@backstage/plugin-scaffolder-backend'}}",
"@backstage/plugin-techdocs-backend": "^{{version '@backstage/plugin-techdocs-backend'}}",
"@octokit/rest": "^18.0.0",
-1
View File
@@ -8,7 +8,6 @@ The following values are read from the configuration file.
```yaml
rollbar:
organization: organization-name
accountToken:
$env: ROLLBAR_ACCOUNT_TOKEN
```
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Config {
/** Configuration options for the rollbar-backend plugin */
rollbar?: {
/**
* The autentication token for accessing the Rollbar API
* @see https://explorer.docs.rollbar.com/#section/Authentication
*/
accountToken: string;
};
}
+4 -2
View File
@@ -42,6 +42,8 @@
"supertest": "^4.0.2"
},
"files": [
"dist"
]
"dist",
"config.d.ts"
],
"configSchema": "config.d.ts"
}
+1
View File
@@ -54,6 +54,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
# app.config.yaml
rollbar:
organization: organization-name
# used by rollbar-backend
accountToken:
$env: ROLLBAR_ACCOUNT_TOKEN
```
+27
View File
@@ -0,0 +1,27 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Config {
/** Configuration options for the rollbar plugin */
rollbar?: {
/**
* The Rollbar organization name. This can be omitted by using the `rollbar.com/project-slug` annotation.
* @see https://backstage.io/docs/features/software-catalog/well-known-annotations#rollbarcomproject-slug
* @visibility frontend
*/
organization?: string;
};
}
+3 -17
View File
@@ -51,22 +51,8 @@
"msw": "^0.21.2"
},
"files": [
"dist"
"dist",
"config.d.ts"
],
"configSchema": {
"$schema": "https://backstage.io/schema/config-v1",
"title": "@backstage/rollbar",
"type": "object",
"properties": {
"rollbar": {
"type": "object",
"properties": {
"organization": {
"type": "string",
"visibility": "frontend"
}
}
}
}
}
"configSchema": "config.d.ts"
}