Build step 'Quality Gates' marked build as failure - SonarQube 7.7

Hello Team,

I am using SonarQube 7.7 and have integrated it with Jenkins 2.177. Quality Gates and SonarQube Scanner plugins are installed in Jenkins. SonarQube Server has also been configured correctly. But, when a job is executed, it is failing with the below error. Although the analysis is getting uploaded on SonarQube server.

06:14:30.253 DEBUG: Post-jobs :
06:14:30.474 INFO: Analysis total time: 1:40.813 s
06:14:30.477 INFO: ------------------------------------------------------------------------
06:14:30.477 INFO: EXECUTION SUCCESS
06:14:30.477 INFO: ------------------------------------------------------------------------
06:14:30.478 INFO: Total time: 1:46.702s
06:14:30.612 INFO: Final Memory: 24M/706M
06:14:30.612 INFO: ------------------------------------------------------------------------
quality.gates.jenkins.plugin.QGException: Expected status 200, got: 404. Response: {“errors”:[{“msg”:“Unknown url : /api/events”}]}
at quality.gates.sonar.api.SonarHttpRequester.executeGetRequest(SonarHttpRequester.java:59)
at quality.gates.sonar.api.SonarHttpRequester.getAPIInfo(SonarHttpRequester.java:47)
at quality.gates.sonar.api.QualityGatesProvider.getRequesterResult(QualityGatesProvider.java:34)
at quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(QualityGatesProvider.java:29)
at quality.gates.jenkins.plugin.BuildDecision.getStatus(BuildDecision.java:20)
at quality.gates.jenkins.plugin.QGPublisher.perform(QGPublisher.java:73)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step ‘Quality Gates’ marked build as failure
Finished: FAILURE

Any help would really be appreciated.

Thanks in advance !!!

Hi,

I’m not familiar with the Quality Gates build step. This sounds like a 3rd-party Jenkins plugin(?). If so, you should double-check its configuration. Note that the SonarScanner for Jenkins natively supports QG status in pipelines.

 
Ann