Break on Quality gate task not failing in Azure Devops

Template for a good new topic, formatted with Markdown:

  • ALM used: azure Devops
  • CI system usedAzure DevOps
  • Scanner command used when applicable:
    • task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
      displayName: ‘Run Code Analysis’
      condition: and (succeeded(),eq(variables[‘SonarCloudEnabled’], ‘true’))
  • Languages of the repository: python
  • SonarCloud project is no public,

View raw log

  1. Starting: Break build on quality gate failure

Task : SonarCloud build breaker

Description : Break the build when the quality gate fails.

Version : 2.1.2

Author : Simon de Lang

Help :


Number of analyses in this build: 0

Summary of statusses:

Finishing: Break build on quality gate failure 
  • Steps to reproduce
    run the task SonarCloud run Code Analysis in a code that has less coverage than configured in the gate
    run the task SonarCloud break on quality gate

The azure Devops Extension page shows that the gate has failed:

TI.PKG.ll_external_secrets Quality Gate Failed

Coverage on New Code 50.0% < 80.0%

[Detailed SonarCloud report >](


I have found no workaround yet.

Hey there.

I suggest raising an issue with the maintainer.

Or using the sonar.qualitygate.wait=true analysis parameter as outlined in the documentation page you linked

For other CIs, you can use the sonar.qualitygate.wait=true analysis parameter in your configuration file. Setting sonar.qualitygate.wait to true forces the analysis step to poll your SonarQube instance until the quality gate status is available. This increases the pipeline duration and causes the analysis step to fail any time the quality gate fails, even if the actual analysis is successful. You should only use this parameter if it’s necessary.