jenkinssonarqubejenkins-pluginssonarqube5.1

sonar.Qualitygate is Deprecated in Sonar Qube 5.3. What is the alternative?


Context: In Sonar Qube, there exists a custom Quality Gate which is called say abcd. This is NOT the default quality gate. And in Jenkins, I had configured this SonarQube Quality Gate for a set of APIs by using the parameter -Dsonar.QualityGate=abcd and it was working fine.

Recently Sonar Qube was upgraded to version 5.3. Since then, the abcd quality gate is not working and the default quality gate is coming into play instead of the abcd quality gate for all the APIs.

On analysis, I came to know that sonar.QualityGate is deprecated in Version 5.3.

Question: Can you please let me know what is the alternative? And how do I make sure that these set of APIs have abcd as the quality gate and not the default quality gate?

I would prefer a solution such that I can configure something on Jenkins as I have access to Jenkins but not to Sonar Qube configurations.


Solution

  • It's indeed no more possible to set the Quality Gate of a project using a parameter when running an analysis. It's only possible from the UI/WS, where you can specify which Quality Gate should be used for which project.

    See the documentation for more information : http://docs.sonarqube.org/display/SONAR/Quality+Gates.