Build-Breaker Plugin

Is the Build-Breaker plugin now obsolete? I do not see it on the Plugin Matrix

We are upgrading from 5.6.6 to 6.7, on our way to 7.9 when it’s released and I don’t know whether we should keep or delete the current version of build-breaker plugin we are using, v2.2. If this plugin is now obsolete, what has replaced it?

Yes, it has been dropped in 2016. The 2.2 version is compatible with SonarQube 5.5 - 6.3 (see SonarQube Build Breaker Plugin).

You should read this to understand Why You Shouldn’t Use Build Breaker.

There is no replacement, but:

  • you can execute web API to get QG state and fail your build
  • if you use Jenkins you can use waitForQualityGate step (read more here)
1 Like

In our installation the Sonarserver and jenkins instance are placed in different network segments. And there is no way to communicate from Sonar to jenkins. Only the other way from jenkins to Sonar is possible.

So we have to have a “kind of build breaker solution” that works with active polling from the jenkinsfile.

Did anyone this before and would kindly share some code snippets or hints on which sonar api endpoints to use?

Thank you in advance.

We have solutions that work for scripted pipelines based on your initial repsonse, but is there a solution for classic (GUI) Jenkins jobs whether they be freestyle, Maven, Gradle, etc. builds?


I think the recommended way is to rewrite freestyle jobs to pipeline jobs. The pipeline API allows to do all actions in more clear way. Of course some additional plugins are useful (like Pipeline Maven).

The quickest solution for Maven is use sonar-build-breaker plugin (I’ve never used it).

For Gradle I have no quick solutions.

Yes, it’s obsolete when using Jenkins pipelines with Sonarqube webhooks.
But the Build-Breaker plugin has been revived, see

and it has an interesting feature

Thank you Gilbert. Has this been added to the Marketplace yet? If not, is there any ETA. I’m leery about using something not yet vetted and approved for the Marketplace. I was trying to connect to the marketplace using this URL: but I get a message that I am not authorized. Instead I connected from within Sonar but the only plugins populated are those that come with the community edition and the additional ones we added for specific languages.

No approval for marketplace yet, seems it’s still in progress.
See the thread i mentioned.
Nevertheless there’s already a new release available at github, might be an option
for community edition and special circumstances.
I would always prefer to make the Sonarqube > Jenkins communication work and
use Sonarqube webhooks, don’t see any cons for that - ok maybe with Jenkins pipelines
using parallel Sonarqube analysis + waitforQualityGate() stages, there are intermittent errors.