Java – how can I fail Hudson / Jenkins if the sonar threshold is broken?

I'm using Maven to build my java application. Jenkins provides metrics for CI and sonar

At present, I have a construction work to create sonar report (triggered by Jenkins' post production steps.)

If certain thresholds are reached – i.e. any significant or blocked violation or complexity exceeds 1.7, I want to set this failure

Any guidance would be appreciated! – L

Solution

Install the build breaker plug-in

If your code violates any of the alert thresholds specified in the project sonar quality profile, your build will fail

to update

Sonarqube no longer recommends this plug-in:

> http://www.sonarqube.org/why-you-shouldnt-use-build-breaker/

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>