- Notifications
You must be signed in to change notification settings - Fork1
SonarQube ❤ Build Breaker designed to Fail pipeline builds according to Quality Gates️
License
daggerok/sonar-quality-gates-build-breaker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SonarQube Build Breaker designed to fail SonarQube analysis during CI pipeline build if quality grates not passed
Easy as 1-2-3
add
sonar-breaker-maven-pluginin your projectpom.xml file:<project> <build> <plugins> <plugin> <groupId>com.github.daggerok.sonar</groupId> <artifactId>sonar-breaker-maven-plugin</artifactId> <version>1.0.1</version><!-- <configuration> <delay>1</delay> <retry>100</retry> <standalone>false</standalone> <allowFailure>false</allowFailure> <projectBaseDir>${maven.multiModuleProjectDirectory}</projectBaseDir> <metadataFilePath>${maven.multiModuleProjectDirectory}/target/sonar/report-task.txt</metadataFilePath> <metricsExcludes>new_coverage</metricsExcludes> </configuration>--> </plugin> </plugins> </build></project>
NOTE: Do not forget setup
sonar-maven-pluginas well,sonar-breakerwill be use analysis metadata generated bysonar:sonargoal executionbuild project, run sonar analysis and run sonar-breaker analyzer:
mvn clean install sonar:sonar sonar-breaker:analyze
build project and examin sonar analysis:
mvn install sonar:sonar
download latestsonar-breakerexecutable jar file.
wget -O sb.jar https://repo1.maven.org/maven2/com/github/daggerok/sonar/sonar-breaker/1.0.1/sonar-breaker-1.0.1.jar
finally run sonar-breaker analysis:
java -jar sb.jar target/sonar/report-task.txt
seeexamples
enjoy your bugs free code! 👍
About
SonarQube ❤ Build Breaker designed to Fail pipeline builds according to Quality Gates️
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
