Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/buildbreaker.html|width=700|height=250|frameborder=0}
Your browser does not support iframes.
{iframe}

Description / Features

This plugin will make the build report as failed if at least one alert is raised during analysis. Thresholds for alerts are defined in Quality quality profiles, for example "coverage < 50%". It is to be noted that analysis does not stop, it will go to the end. Only the status of the build will report failure.

...

Example of logs:

Code Block
languagenone
[ERROR] Coverage < 50%
[ERROR] Class complexity > 20
[INFO]  ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  ------------------------------------------------------------------------
[INFO]  Can not execute Sonar

Embedded error: Alert thresholds are hit (2).

Installation

  1. copy the JAR file in the directory Install the Build Breaker plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins plugins directory
  2. restart Restart the Sonar server

Usage

  1. Define some alert thresholds in the Quality quality profile of your project
  2. Execute code analysis

Configuration

  1. Run a Sonar analysis on your project

 

Note
titleAvailable in version 1.1 (not yet released)

Advanced Usage

By default this plugin is active on

...

every project.

...

But you can skip its execution on some of them by setting the sonar.buildbreaker.skip

...

sonar.buildbreaker.skip can be set globally or at project level. Its type is boolean, the default value being false.

...

 property to true at project level. This property can also be set at instance level.

Change Log

JIRA Issues
anonymoustrue
titleRelease 1.1
height70
renderModestatic
width900
columnstype;key;summary;priority;resolution;status
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18620&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.0
height70
renderModestatic
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16909&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

...

JIRA Issues
anonymoustrue
titleRelease 0.1
heightrenderMode70static
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15589&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000