Jenkins build fail on sonar code quality violations

1,499 views
Skip to first unread message

Marcus Nörder-Tuitje

unread,
Aug 29, 2011, 10:22:57 AM8/29/11
to Jenkins Users
Hello,

I'd like to let my jenkins build job fail, if (new or changed)
commited code does not fufil the quality
requirements.

Is there any known solution to this?

Thanks in advance,
Marcus

Didier Durand

unread,
Aug 29, 2011, 10:32:15 AM8/29/11
to Jenkins Users
Hi,

Log parser plugin (https://wiki.jenkins-ci.org/display/JENKINS/Log
+Parser+Plugin) may be the solution to your need: you can parse the
console log, detect via regexp the strings meaning that the quality
level has not been reached and then let the job fail.

regards

didier

shmc

unread,
Aug 29, 2011, 1:10:18 PM8/29/11
to Jenkins Users
Hello Marcus,
You can use the Build Break (http://docs.codehaus.org/display/SONAR/
Build+Breaker) plugin on Sonar to make the job fail if the code is
"not good enough".

Regards,
shmc

Flavio B

unread,
Mar 4, 2016, 6:02:59 AM3/4/16
to Jenkins Users, sergiom...@gmail.com
Hi!

I was looking for a solution to this too.
I've read Build Breaker plugin usage is discouraged. Is there any other way?
- Jenkins 1.651
- SonarQube 5.3

Regards,

Flavio

jpd4nt

unread,
Mar 4, 2016, 11:09:40 AM3/4/16
to Jenkins Users, sergiom...@gmail.com
Hi Flavio

I have not seen or found any other way, a feature request with SonarQube jenkins plugin for a better way may be required.
18

Indra Gunawan (ingunawa)

unread,
Mar 4, 2016, 1:39:51 PM3/4/16
to jenkins...@googlegroups.com, sergiom...@gmail.com
Build Breaker plugin usage is discouraged?  Says who?
Are you reporting that it is not working starting with SonarQube 5.2?

StackOverflow is your friend.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ec7d6886-77ea-4cc6-8399-587378e49b4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Indra Gunawan (ingunawa)

unread,
Mar 4, 2016, 1:49:42 PM3/4/16
to jenkins...@googlegroups.com, sergiom...@gmail.com
From: <jenkins...@googlegroups.com> on behalf of jpd4nt <jdra...@nationaltheatre.org.uk>
Reply-To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
Date: Friday, March 4, 2016 at 8:09 AM
To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
Cc: "sergiom...@gmail.com" <sergiom...@gmail.com>
Subject: Re: Jenkins build fail on sonar code quality violations

--
Reply all
Reply to author
Forward
0 new messages