Integrate SonarQube with your AI agent, scan for secrets and dependency risks, and explore and manage issues—all from the command line.
Start using SonarQube CLI
Failing the pipeline job when the Quality Gate fails
In order for the Quality Gate to fail on the GitLab side when it fails on the SonarQube side, the scanner needs to wait for the SonarQube Quality Gate status. To enable this, set the sonar.qualitygate.wait=true parameter in the .gitlab-ci.yml file.
You can set the sonar.qualitygate.timeout property to an amount of time (in seconds) that the scanner should wait for a report to be processed. The default is 300 seconds.
If you don’t want the pipeline to fail on Quality Gate failure, you can remove sonar.qualitygate.wait from your gitlab-ci.yml