Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SonarQube ❤ Build Breaker designed to Fail pipeline builds according to Quality Gates️

License

NotificationsYou must be signed in to change notification settings

daggerok/sonar-quality-gates-build-breaker

Repository files navigation

SonarQube Build Breaker designed to fail SonarQube analysis during CI pipeline build if quality grates not passed

SonarQube 💥 Build Breaker

Easy as 1-2-3

Maven plugin quick start

  1. addsonar-breaker-maven-plugin in 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>

    seesonar-breaker-maven-plugin pom.xml file

  2. NOTE: Do not forget setupsonar-maven-plugin as well,sonar-breaker will be use analysis metadata generated bysonar:sonar goal execution

  3. build project, run sonar analysis and run sonar-breaker analyzer:

    mvn clean install sonar:sonar sonar-breaker:analyze

Sonar Breaker standalone quick start

  • 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! 👍

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp