Azure Devops CI build is not breaking when the quality gate fails

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
  • Potential workaround

The CI build is not breaking when the quality gate fails.

We have added below properties as well in the SonarCloudPrepare task to break the build once the quality gate fails.


And, Also add a Branch Policy on the quality gate upon pull requests, and block them from merging if the Quality Gate fails.

Both the possible workaround didn’t work.

Please suggest the possible solutions on the above mentioned issue.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


You haven’t provided a lot to go on. Perhaps the docs will help.