Skip to content
Breaks the build if the quality gate of the project is red
Java Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper
cli
library
sqbb-maven-plugin
.editorconfig
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
mvnw
mvnw.cmd
pom.xml
sonarqube-build-breaker.pub
sonarqube.sh

README.md

SonarQube build breaker

Build Status

Breaks the build if the SonarQube quality gate of the project is red.

See the blog post I wrote for more details.

Components

  • Maven plugin - You can use this to run it in your Maven build.
  • CLI - You can use this to run it in your CI pipeline as standalone application.
  • Library - A library which provides the building blocks. You only need this if you want to develop your own build breaker.

Usage

Recommended usage in the GitLab pipeline

Put this line directly after the SonarQube analysis:

mvn --batch-mode --update-snapshots --non-recursive de.qaware.tools.sonarqube-build-breaker:sqbb-maven-plugin:sqbb -Dsqbb.sonarQubeUrl=$SONAR_URL -Dsqbb.sonarQubeToken=$SONAR_TOKEN -Dsqbb.branch=$CI_BUILD_REF_NAME

This line will automatically download the newest SonarQube build breaker and run it.

The build breaker needs two environment variables set:

  • SONAR_TOKEN
  • SONAR_URL

These can be configured in the CI/CD settings in the GitLab project configuration.

Changelog

See this document.

License

Licensed under MIT, Copyright (c) 2019 - 2020 QAware GmbH

Maintainer

Moritz Kammerer (moritz.kammerer@qaware.de | @phxql)

You can’t perform that action at this time.