change all $env to ${}

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-04-15 13:25:48 +02:00
parent c10e6490ca
commit c28689c686
26 changed files with 184 additions and 345 deletions
+1 -2
View File
@@ -55,8 +55,7 @@ proxy:
target: 'https://api.bitrise.io/v0.1'
allowedMethods: ['GET']
headers:
Authorization:
$env: BITRISE_AUTH_TOKEN
Authorization: ${BITRISE_AUTH_TOKEN}
```
Learn on https://devcenter.bitrise.io/api/authentication how to create a new Bitrise token.
+1 -2
View File
@@ -43,8 +43,7 @@ proxy:
'/circleci/api':
target: https://circleci.com/api/v1.1
headers:
Circle-Token:
$env: CIRCLECI_AUTH_TOKEN
Circle-Token: ${CIRCLECI_AUTH_TOKEN}
```
5. Get and provide `CIRCLECI_AUTH_TOKEN` as env variable (https://circleci.com/docs/api/#add-an-api-token)
+1 -3
View File
@@ -50,9 +50,7 @@ proxy:
target: https://app.fossa.io/api
allowedMethods: ['GET']
headers:
Authorization:
# Content: 'token <your-fossa-api-token>'
$env: FOSSA_AUTH_HEADER
Authorization: token ${FOSSA_API_TOKEN}
# if you have a fossa organization, configure your id here
fossa:
+2 -4
View File
@@ -29,15 +29,13 @@ proxy:
target: 'http://localhost:8080' # your Jenkins URL
changeOrigin: true
headers:
Authorization:
$env: JENKINS_BASIC_AUTH_HEADER
Authorization: Basic ${JENKINS_BASIC_AUTH_HEADER}
```
4. Add an environment variable which contains the Jenkins credentials, (note: use an API token not your password). Here user is the name of the user created in Jenkins.
```shell
HEADER=$(echo -n user:api-token | base64)
export JENKINS_BASIC_AUTH_HEADER="Basic $HEADER"
export JENKINS_BASIC_AUTH_HEADER=$(echo -n user:api-token | base64)
```
5. Run app with `yarn start`
+1 -2
View File
@@ -15,8 +15,7 @@ proxy:
'/newrelic/apm/api':
target: https://api.newrelic.com/v2
headers:
X-Api-Key:
$env: NEW_RELIC_REST_API_KEY
X-Api-Key: ${NEW_RELIC_REST_API_KEY}
```
In your production deployment of Backstage, you would also need to ensure that
+1 -2
View File
@@ -8,8 +8,7 @@ The following values are read from the configuration file.
```yaml
rollbar:
accountToken:
$env: ROLLBAR_ACCOUNT_TOKEN
accountToken: ${ROLLBAR_ACCOUNT_TOKEN}
```
_NOTE: The `ROLLBAR_ACCOUNT_TOKEN` environment variable must be set to a read
+1 -2
View File
@@ -45,8 +45,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
rollbar:
organization: organization-name
# used by rollbar-backend
accountToken:
$env: ROLLBAR_ACCOUNT_TOKEN
accountToken: ${ROLLBAR_ACCOUNT_TOKEN}
```
6. Annotate entities with the rollbar project slug
+1 -3
View File
@@ -70,9 +70,7 @@ proxy:
target: https://sentry.io/api/
allowedMethods: ['GET']
headers:
Authorization:
# Content: 'Bearer <your-sentry-token>'
$env: SENTRY_TOKEN
Authorization: Bearer ${SENTRY_TOKEN}
sentry:
organization: <your-organization>
+11 -13
View File
@@ -54,10 +54,9 @@ proxy:
target: https://sonarcloud.io/api
allowedMethods: ['GET']
headers:
Authorization:
# Content: 'Basic base64("<api-key>:")' <-- note the trailing ':'
# Example: Basic bXktYXBpLWtleTo=
$env: SONARQUBE_AUTH_HEADER
Authorization: Basic ${SONARQUBE_AUTH}
# Content: 'base64("<api-key>:")' <-- note the trailing ':'
# Example: bXktYXBpLWtleTo=
```
**SonarQube**
@@ -70,20 +69,19 @@ proxy:
target: https://your.sonarqube.instance.com/api
allowedMethods: ['GET']
headers:
Authorization:
# Environmental variable: SONARQUBE_AUTH_HEADER
# Value: 'Basic base64("<sonar-auth-token>:")'
# Encode the "<sonar-auth-token>:" string using base64 encoder.
# Note the trailing colon (:) at the end of the token.
# Example environmental config: SONARQUBE_AUTH_HEADER=Basic bXktYXBpLWtleTo=
# Fetch the sonar-auth-token from https://sonarcloud.io/account/security/
$env: SONARQUBE_AUTH_HEADER
Authorization: Basic ${SONARQUBE_AUTH}
# Environmental variable: SONARQUBE_AUTH
# Value: 'base64("<sonar-auth-token>:")'
# Encode the "<sonar-auth-token>:" string using base64 encoder.
# Note the trailing colon (:) at the end of the token.
# Example environmental config: SONARQUBE_AUTH=bXktYXBpLWtleTo=
# Fetch the sonar-auth-token from https://sonarcloud.io/account/security/
sonarQube:
baseUrl: https://your.sonarqube.instance.com
```
5. Get and provide `SONARQUBE_AUTH_HEADER` as env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
5. Get and provide `SONARQUBE_AUTH` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
6. Run the following commands in the root folder of the project to install and compile the changes.
+3 -5
View File
@@ -50,7 +50,7 @@ import {
In order to be able to perform certain action (create-acknowledge-resolve an action), you need to provide a REST Endpoint.
To enable the REST Endpoint integration you can go on https://portal.victorops.com/ inside Integrations > 3rd Party Integrations > REST Generic.
To enable the REST Endpoint integration you can go on https://portal.victorops.com/ inside Integrations > 3rd Party Integrations > REST Generic.
You can now copy the URL to notify: `<SPLUNK_ON_CALL_REST_ENDPOINT>/$routing_key`
In `app-config.yaml`:
@@ -69,10 +69,8 @@ proxy:
'/splunk-on-call':
target: https://api.victorops.com/api-public
headers:
X-VO-Api-Id:
$env: SPLUNK_ON_CALL_API_ID
X-VO-Api-Key:
$env: SPLUNK_ON_CALL_API_KEY
X-VO-Api-Id: ${SPLUNK_ON_CALL_API_ID}
X-VO-Api-Key: ${SPLUNK_ON_CALL_API_KEY}
```
In addition, to make certain API calls (trigger-resolve-acknowledge an incident) you need to add the `PATCH` method to the backend `cors` methods list: `[GET, POST, PUT, DELETE, PATCH]`.
@@ -22,10 +22,8 @@ const EXAMPLE = `auth:
providers:
google:
development:
clientId:
$env: AUTH_GOOGLE_CLIENT_ID
clientSecret:
$env: AUTH_GOOGLE_CLIENT_SECRET
clientId: \${AUTH_GOOGLE_CLIENT_ID}
clientSecret: \${AUTH_GOOGLE_CLIENT_SECRET}
`;
export const EmptyProviders = () => (