Hello All

Just want to know, if there is a way, to mark a jenkins build as unstable
based on Sonar Analysis results.

I tried to use sonar build breaker plugin(
http://docs.codehaus.org/display/SONAR/Build+Breaker+Plugin) , to analyse
sonar results and mark a build as Failure. I then tried to then change the
status of Build to Un-stable with Groovy Post Build Plugin, here is the
groovy snippet:
if(manager.logContains(".*Build Step SONAR marked Build as FAILURE.*")) {
    manager.createSummary("warning.gif").appendText("<h1>You have been
warned!</h1>", false, false, false, "red")
    manager.buildUnstable()
}

But, the above script is failing to change status of build. Please help. If
possible.

Thanks,
Krishna Chaitanya

Reply via email to