Displaying analysis failure in BitBucket pipelines

  • SonarQube version 9.0.1 (build 46107)
  • Scanner - gradle plugin org.sonarqube:3.3

We want to integrate SonarQube into our BitBucket repo pipelines.
Our goal is to be able to detect failures in sonar for each individual pipeline run (not only PRs), so we can fix it ASAP before merging to master/version branches.

In the past, we have been using BuildBreaker plugin for that, but it seems to not work anymore (max polling attempts reached every time).

Following the instructions on the “create project” from bitbucket page, we are able to invoke the scan as a pipeline step, but it passes even when the scan fails on SonarQube side.

What’s the best practice/suggested approach here?