sonar-quality-gate:check
Full name:
io.github.r0bb3n:sonar-quality-gate-maven-plugin:1.3.0:check
Description:
Check project status in SonarQube and fail build, if quality gate
is not passed
Attributes:
- Requires a Maven project to be executed.
- Executes as an aggregator plugin.
- The goal is not marked as thread-safe and thus does not support parallel builds.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<branch> |
String |
1.0.0 |
name of the branch to check the quality gate in sonar only used in mode: advanced User property is: sonar-quality-gate.branch . |
<checkTaskAttempts> |
int |
1.0.0 |
How often try to retrieve the analysis id from the task details in
sonar until stopping the job only used in mode: integrated Default value is: 10 .User property is: sonar-quality-gate.checkTask.attempts . |
<checkTaskIntervalS> |
int |
1.0.0 |
How many seconds to wait between two requests when retrieving task
details only used in mode: integrated Default value is: 5 .User property is: sonar-quality-gate.checkTask.interval.s . |
<failOnMiss> |
boolean |
1.2.0 |
fail the execution, if the quality gate was not passed (not
OK )Default value is: true .User property is: sonar-quality-gate.failOnMiss . |
<pullRequest> |
String |
1.0.0 |
name of the pull request to check the quality gate in sonar only used in mode: advanced User property is: sonar-quality-gate.pullRequest . |
<skip> |
boolean |
1.2.0 |
skip the execution of this plugin Default value is: false .User property is: sonar-quality-gate.skip . |
<sonarHostUrl> |
URL |
1.0.0 |
sonar host url (aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters) Default value is: http://localhost:9000 .User property is: sonar.host.url . |
<sonarLogin> |
String |
1.0.0 |
sonar login (username or token), see also SonarQube
- Web API Authentication (aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters) Since version 1.3.0 instead the environment variable SONAR_TOKEN can be used to provide a token (see these
docs of SonarCloud
and SonarQube
).User property is: sonar.login . |
<sonarPassword> |
String |
1.0.0 |
sonar password, see also SonarQube
- Web API Authentication (aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters) User property is: sonar.password . |
<sonarProjectKey> |
String |
1.0.0 |
project key used in sonar for this project only used in modes: simple, advanced (aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters) Default value is: ${project.groupId}:${project.artifactId} .User property is: sonar.projectKey . |
Parameter Details
<branch>
name of the branch to check the quality gate in sonar
only used in mode: advanced
only used in mode: advanced
- Type:
java.lang.String
- Since:
1.0.0
- Required:
No
- User Property:
sonar-quality-gate.branch
<checkTaskAttempts>
How often try to retrieve the analysis id from the task details in
sonar until stopping the job
only used in mode: integrated
only used in mode: integrated
- Type:
int
- Since:
1.0.0
- Required:
No
- User Property:
sonar-quality-gate.checkTask.attempts
- Default:
10
<checkTaskIntervalS>
How many seconds to wait between two requests when retrieving task
details
only used in mode: integrated
only used in mode: integrated
- Type:
int
- Since:
1.0.0
- Required:
No
- User Property:
sonar-quality-gate.checkTask.interval.s
- Default:
5
<failOnMiss>
fail the execution, if the quality gate was not passed (not
OK
)- Type:
boolean
- Since:
1.2.0
- Required:
No
- User Property:
sonar-quality-gate.failOnMiss
- Default:
true
<pullRequest>
name of the pull request to check the quality gate in sonar
only used in mode: advanced
only used in mode: advanced
- Type:
java.lang.String
- Since:
1.0.0
- Required:
No
- User Property:
sonar-quality-gate.pullRequest
<skip>
skip the execution of this plugin
- Type:
boolean
- Since:
1.2.0
- Required:
No
- User Property:
sonar-quality-gate.skip
- Default:
false
<sonarHostUrl>
sonar host url
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
- Type:
java.net.URL
- Since:
1.0.0
- Required:
No
- User Property:
sonar.host.url
- Default:
http://localhost:9000
<sonarLogin>
sonar login (username or token), see also SonarQube
- Web API Authentication
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
Since version 1.3.0 instead the environment variable
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
Since version 1.3.0 instead the environment variable
SONAR_TOKEN
can be used to provide a token (see these
docs of SonarCloud
and SonarQube
).- Type:
java.lang.String
- Since:
1.0.0
- Required:
No
- User Property:
sonar.login
<sonarPassword>
sonar password, see also SonarQube
- Web API Authentication
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
- Type:
java.lang.String
- Since:
1.0.0
- Required:
No
- User Property:
sonar.password
<sonarProjectKey>
project key used in sonar for this project
only used in modes: simple, advanced
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
only used in modes: simple, advanced
(aligned to sonar-maven-plugin analysis parameters, see also SonarQube - Analysis Parameters)
- Type:
java.lang.String
- Since:
1.0.0
- Required:
No
- User Property:
sonar.projectKey
- Default:
${project.groupId}:${project.artifactId}