Arshad Ali
Arshad Ali

Reputation: 93

How to use the Build Breaker on sonarqube 5.1+ if a project quality gate fails

I am using Jenkins Continuous Integration server and Sonarqube for code coverage. I want to make sure that if the issues in the project reach a threshold value of Quality Gate, the project build should fail. I have installed Build Breaker plugin in Sonarqube. I read somewhere that it applies on each and every project by default and sends build failed report to CI server(Jenkins in my case).

But this is not happening. My project builds are successful on CI server even if the issues have reached threshold value.

I am not able to use Build Breaker as it doesn't provides any parameters or something to configure it. The problem looks like this:

It looks like following in settings

Please help me to configure this, so that I can send a failed build status to my CI server. If it is not possible in any way, then please let me know if there is any notification mechanism to at least notify developers about issues that have reached threshold.

Upvotes: 4

Views: 5777

Answers (2)

Teryk - SonarSource
Teryk - SonarSource

Reputation: 994

The Build Breaker stopped working in SonarQube 5.2. You now have 2 ways to implement the Build Breaker functionality:

For a bit of context, here's why SonarSource thinks the Build Breaker shouldn't be used

Upvotes: 4

Mike Barry
Mike Barry

Reputation: 993

I see you are using sonarqube 5.1 and Jenkins. Pre-commit build breaking with build breaker stopped working in sonarqube 5.1. (See: http://sonarqube-archive.15.x6.nabble.com/Sonarqube-and-Build-Breaker-Plugin-td5034703.html)

I think this has been resolved as of 5.4 but am unsure.

Mike

Upvotes: 2

Related Questions