Merge pull request #6966 from RoadieHQ/sonar-readme
proxy backend to take care of encoding sonar token
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
---
|
||||
|
||||
Update README to show a simpler proxy configuration.
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user