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?
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?
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).
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: https://update.sonarsource.org/ 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.