Configuration
Some configurations are available for u-sonar-status
:
application.properties
filegitlab.host=https://gitlab.com gitlab.api.token=glpat-rXzx1n17cqUnmo437XSf gitlab.external.check.url=https://company.example.com/u-sonar-status/gitlab gitlab.external.check.name=SONAR sonarqube.host=https://sonarcloud.io/ sonarqube.api.token=3bd9fdc773d5a6df3d2a12f8c35ae2b3e13b8944 branch.bypass=^mr(\\d+)_.+
You can use any of the Configuration Sources supported by Quarkus to set the values.
For example you can use following system property to set the gitlab.api.token
value:
gitlab.api.token
using a system property:export GITLAB_API_TOKEN=glpat-rXzx1n17cqUnmo437XSf
SonarQube host
Specify the location of the GitLab server:
-
key:
sonarqube.host
-
default value
https://sonarcloud.io/
SonarQube API token
Specify the api token value used when u-sonar-status
is performing REST calls against SonarQube.
-
key:
sonarqube.api.token
-
No default value.
-
Mandatory for the application to start
SonarQube Webhook secret
-
key:
sonarqube.webhook.secret
-
No default value.
-
Mandatory only if you have set a secret when you have registered the SonarQube Webhook (the value has to be the same)
GitLab host
Specify the location of the GitLab server:
-
key:
gitlab.host
-
default value
https://gitlab.com
GitLab API token
Specify the api token value used when u-sonar-status
is performing REST calls against GitLab.
-
key:
gitlab.api.token
-
No default value.
-
Mandatory for the application to start
GitLab External Check URL
Specify the URL where GitLab should send the webhook event (see Example payload sent to external service).
So it points to the non-blocking or blocking GitLab endpoints of the u-sonar-status
tool.
The URL has to be accessible for GitLab.
-
key:
gitlab.external.check.url
-
No default value.
-
Mandatory for the application to start
GitLab External Check name
Specify the name of the check in Gitlab.
-
key:
gitlab.external.check.name
-
default value:
SONAR
Quality Gate Bypass - branch pattern
Specify the regex pattern of branches where the Quality Gate must be bypassed. If the source branch name matches the given pattern, Gitlab’s external status check is automatically set to green, without the need to query Sonar.
-
key:
branch.bypass
-
No default value
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.