SonarQube Cloud | Advanced setup | CI-based analysis | Azure pipelines | Checking quality gate in release pipeline
Checking the SonarQube Cloud quality gate status in your Azure release pipeline
On this page
If the Publish Quality Gate Result task in your build pipeline is enabled, you can check the SonarQube Server quality gate status in your release pipeline. It takes place as a pre-deployment gate.
Note that this feature is in preview and:
- Only the quality gate related to the primary build artifact of the release will be checked.
- During a build, if multiple analyses are performed, all of the related quality gates are checked. If one of them has the status WARN, ERROR, or NONE, then the quality gate status on the release pipeline will be failed.
- If the quality gate is in the failed state, it will not be possible to get the pre-deployment gate passing as this status will remain in its initial state. You will have to execute another build with either the current issues corrected in SonarQube Server or with another commit for fixing them.
- The pre-deployment gates in the release pipeline check the status every five minutes for one day, by default. If you know that the SonarQube Server quality gate has failed and will remain in the failed state on Azure DevOps, you can increase this duration to a maximum of 6 minutes (so the gate will be evaluated only twice), or just cancel the release itself.
To check the SonarQube Server quality gate status in your Azure release pipeline:
- In the Azure release pipeline, add a stage, then select pre-deployment conditions.
- Enable the gates, then select add. Choose SonarQube Cloud Quality Gate status check.
- Save your pipeline.
Related pages
Adding the analysis to your build pipeline:
- Adding analysis to your Azure pipeline for a Gradle or Maven project
- Adding analysis to your Azure pipeline for a .NET project
- Adding analysis to your Azure pipeline for a C family project
- Adding analysis to your Azure pipeline for a JS, TS, GO, Python, PHP or other project
- Adding analysis to your Azure pipeline for a monorepo
- SonarQube tasks for Azure Pipelines
Was this page helpful?