I am using maven to build my java app, Jenkins for CI and Sonar for metrics.
Currently I have a build job that creates the sonar report. (Triggered via a post-build step in Jenkins.)
I would like to set this up to fail the build if certain thresholds are met - i.e. any major or blocker violations or Complexity more than 1.7.
Any guidance would be appreciated! - L
Use Jenkins Quality Gates Plugin, which fails the build if the predefined sonar quality gates are not green.
This plugin will stop a job when a quality gate measures is detected.
Install the build breaker plugin.
Fails your build if the code breaches any of the alert thresholds you specify on the project's Sonar quality profile.
Sonarqube no longer recommends the use of this plugin:
It appears the product has changed since I wrote this answer 7 years ago
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With