proxy backend to take care of encoding sonar token

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2021-08-26 12:19:44 +01:00
parent e9491caa78
commit d887ad08c5
+7 -13
View File
@@ -45,10 +45,9 @@ proxy:
'/sonarqube':
target: https://sonarcloud.io/api
allowedMethods: ['GET']
headers:
Authorization: Basic ${SONARQUBE_AUTH}
# Content: 'base64("<api-key>:")' <-- note the trailing ':'
# Example: bXktYXBpLWtleTo=
auth: '${SONARQUBE_TOKEN}:'
# Environmental variable: SONARQUBE_TOKEN
# Fetch the sonar-auth-token from https://sonarcloud.io/account/security/
```
**SonarQube**
@@ -58,20 +57,15 @@ proxy:
'/sonarqube':
target: https://your.sonarqube.instance.com/api
allowedMethods: ['GET']
headers:
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/
auth: '${SONARQUBE_TOKEN}:'
# Environmental variable: SONARQUBE_TOKEN
# Fetch the sonar-auth-token from https://sonarcloud.io/account/security/
sonarQube:
baseUrl: https://your.sonarqube.instance.com
```
4. Get and provide `SONARQUBE_AUTH` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
4. Get and provide `SONARQUBE_TOKEN` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
5. Run the following commands in the root folder of the project to install and compile the changes.