Giter Club home page Giter Club logo

sonar-quality-gates-build-breaker's Introduction

SonarQube 💥 Build Breaker Build Status Download Maven Central

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. add sonar-breaker-maven-plugin in your project pom.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>

    see sonar-breaker-maven-plugin pom.xml file

  2. NOTE: Do not forget setup sonar-maven-plugin as well, sonar-breaker will be use analysis metadata generated by sonar: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 latest sonar-breaker executable 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

see examples

enjoy your bugs free code! 👍

sonar-quality-gates-build-breaker's People

Contributors

daggerok avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

javedaws1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.