How to knock down a sonar in the maven yard: a sonar based on quality gates

How to fail a sonar for a maven target: a sonar based on gate quality rules? I run it for local assemblies, for CI I already wrote a script according to http://docs.sonarqube.org/display/SONAR/Breaking+the+CI+Build So, if the quality validation check failed, the target should also tolerate failure

+5
source share
2 answers

I added the script command as a post step command, so after the assembly has completed the script quality check and breaks the job if they are not ok.

+2
source

You can use the SonarQube Build Breaker plugin .

This is a controversial feature described in the blog post Why You Shouldn't Use Build Breaker .

It is also possible to integrate using the Jenkins network hook (see the blog post Break SonarQube Analysis Using Jenkins Piping ).

0
source

Source: https://habr.com/ru/post/1246249/


All Articles