Does the Sonarqube 8.9 LTS will support to mark Jenkins Build as Failed if Quality gate get fails?

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 8.9LTS
  • what are you trying to achieve
    We are trying to fail the Jenkins Build based on the Quality Gate status. i.e. if the QG get fails my job has to fail.
  • what have you tried so far to achieve this
    We have tried by installing the Quality Gates and Sonar Quality Gates Plugins in Jenkins [Jenkins 2.319.2] and specified the sonarqube URL and credentials at Jenkins configure system level, then finally added the Quality Gates/Sonar Quality Gates Plugins in the Post build section of the Jenkins .Even though Quality gate is failed by job is not failed.
    Could you please suggest me how to make this to be done.

Hey there.

I think you’re looking for the SonarScanner for Jenkins.

Specifically, the section on Pause pipeline until the Quality Gate is computed.

If you’re using a classic Jenkins job (not scripted/declarative), you could use sonar.qualitygate.wait as well.

The Quality Gates / Sonar Quality Gates plugin is an old, community-supported integration I don’t believe is maintained anymore.