Jenkins – Change: Quality Gate from Jenkins (sonar-runner)


I am using Jenkins to kick off Sonar-runner for analyzing projects.

Now I use the Build Breaker plugin.
This breaks a build when a quality gate is reporting that the quality is below/above given values.

I'd like to change the quality gate used by the Sonar-Runner, on a per-job basis in Jenkins.
Looking up at Analysis Parameters documentation:

**sonar.profile** parameter is to change the language to analyse

I would thought that for the gate: sonar.gate would work (it doesn't)


What parameter for sonar-runner has to be used to change the "Quality Gate"?

Used versions:

  • Jenkins 1.598
  • Sonar 4.5.1 (LTS)

Best Solution

The property is sonar.qualitygate.

It was not documented because this is generally not a good idea to change the quality gate that should be used during a standard analysis - but it's true that it can be useful with the build breaker on preview analyses.

I updated the documentation.

Related Question