SonarQube Tasks continueOnError

Must-share information (formatted with Markdown):

  • Installed version 4.21.0 (Latest) in Azure DevOps
  • In YAML we are using SonarQubePrepare@4, SonarQubeAnalyze@4 and SonarQubePublish@4
  • In all the tasks we are calling continueOnError: false, but it never fails the build even though it has an issue.

Hi Tushmesh, welcome to the SonarSource Community!

The tasks are not designed to fail the build just because there’s an issue found in the code being analyzed. The Publish step would add the quality gate status to your pipeline execution but otherwise it succeeds.

If you want to force a build failure when your Quality Gate fails, please see Failing a pipeline job when the Quality Gate Fails.