Disabling Sonar while running Jenkins

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Disabling Sonar while running Jenkins

GeertVc
Hi,

Using SonarQube 3.6 - SonarRunner 2.2.2 - Jenkins plugin 2.1

Is it possible to temporarily disable Sonar when Jenkins is run?  I've tried with the "Disable" tick box in the Sonar section of the Jenkins manager.

Sonar is indeed not running, but it is flagged as a failure at the end of the Jenkins build, not allowing me to push changes into Gerrit with our mechanism used (using "repo upload')...

------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: Sonar is disabled (Sonar beqbrgbrg1ux054). See global configuration.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE

This is not what I understood when I asked to disable Sonar.  I thought it would simply not do "anything", not even returning a failure to Gerrit.

Any suggestions?

Best rgds,
--Geert Usig SonarQube 3.6 - SonarRunner 2.2.2 - MySql 5.5.32-0
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

Ann Campbell
Wrap the analysis in a Conditional build step (assuming you're not doing a Maven analysis), add a boolean parameter to the build (default true) and feed the parameter result into the conditional.



---
G. Ann Campbell
Systems Architect II
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


On Fri, Aug 9, 2013 at 9:07 AM, GeertVc <[hidden email]> wrote:
Hi,

Using SonarQube 3.6 - SonarRunner 2.2.2 - Jenkins plugin 2.1

Is it possible to temporarily disable Sonar when Jenkins is run?  I've tried
with the "Disable" tick box in the Sonar section of the Jenkins manager.

Sonar is indeed not running, but it is flagged as a failure at the end of
the Jenkins build, not allowing me to push changes into Gerrit with our
mechanism used (using "repo upload')...

------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: Sonar is disabled (Sonar beqbrgbrg1ux054). See global configuration.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE

This is not what I understood when I asked to disable Sonar.  I thought it
would simply not do "anything", not even returning a failure to Gerrit.

Any suggestions?




-----

Best rgds,
--Geert
--
View this message in context: http://sonar.15.x6.nabble.com/Disabling-Sonar-while-running-Jenkins-tp5015920.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

Steffen Breitbach
On Fri, 2013-08-09 at 09:17 -0400, Ann Campbell wrote:
> Wrap the analysis in a Conditional build step (assuming you're not
> doing a Maven analysis), add a boolean parameter to the build (default
> true) and feed the parameter result into the conditional.

With parametrized builds, you could also run the Sonar analysis as a
downstream job.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

GeertVc
In reply to this post by Ann Campbell
Ann,

Could you elaborate a bit more on that one?  Not clear to me what you mean (and no, I don't to Maven analysis).  An example would do good as to where to add the conditional build step...

TIA,

Best rgds,
--Geert

Best rgds,
--Geert Usig SonarQube 3.6 - SonarRunner 2.2.2 - MySql 5.5.32-0
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

Ann Campbell
I believe the name of the plugin you'll need is the Conditional Build Step plugin.

Inline image 1

We always use the multiple step option because there doesn't seem to be a downside to it, and it makes life much easier if you need to run more steps on the same condition down the road.
Inline image 2

HTH




---
G. Ann Campbell
Systems Architect II
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


On Fri, Aug 9, 2013 at 9:26 AM, GeertVc <[hidden email]> wrote:
Ann,

Could you elaborate a bit more on that one?  Not clear to me what you mean
(and no, I don't to Maven analysis).  An example would do good as to where
to add the conditional build step...

TIA,

Best rgds,
--Geert



-----

Best rgds,
--Geert
--
View this message in context: http://sonar.15.x6.nabble.com/Disabling-Sonar-while-running-Jenkins-tp5015920p5015922.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

softwareforums2013
Ann Campbell <ann.campbell@...> writes:

> Hi ann, I am trying to use jenkins conditional build step plugin, but for
some reason in my case it is not being able to evalute the boolean
condition. So, I am wondering where do you specify ${runsonar} value to
true?

your help would be appreciated a lot

Thank you
>
>
> I believe the name of the plugin you'll need is the Conditional Build Step
plugin.
>
>
> We always use the multiple step option because there doesn't seem to be a
downside to it, and it makes life much easier if you need to run more steps
on the same condition down the road.

>
>
> HTH
>
>
>
>
>
>
> ---
> G. Ann Campbell
> Systems Architect II
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
> On Fri, Aug 9, 2013 at 9:26 AM, GeertVc <geert.vancompernolle-
Ysy7NTpMcHVWk0Htik3J/[hidden email]> wrote:

> Ann,
> Could you elaborate a bit more on that one?  Not clear to me what you mean
> (and no, I don't to Maven analysis).  An example would do good as to where
> to add the conditional build step...
> TIA,
> Best rgds,
> --Geert
> -----
> Best rgds,
> --Geert
> --
> View this message in context: http://sonar.15.x6.nabble.com/Disabling-
Sonar-while-running-Jenkins-tp5015920p5015922.html

>
> Sent from the Sonar user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>     http://xircles.codehaus.org/manage_email
>
>
>
>
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this
message. If you are not the addressee indicated in this message (or are not
responsible for delivery of this message to that person) , you may not copy
or deliver this message to anyone. In such case, you should destroy this
message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of
this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or
other information in this message that do not relate to the official
business of the company  or its subsidiaries.
> **********************************************************
>
>
>
>





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

Ann Campbell
A picture is worth 1,000 words. These are from one of my jobs:

Inline image 1
...
Inline image 2



---
G. Ann Campbell
Systems Architect II
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


On Tue, Jan 14, 2014 at 7:45 AM, nate <[hidden email]> wrote:
Ann Campbell <ann.campbell@...> writes:

> Hi ann, I am trying to use jenkins conditional build step plugin, but for
some reason in my case it is not being able to evalute the boolean
condition. So, I am wondering where do you specify ${runsonar} value to
true?

your help would be appreciated a lot

Thank you
>
>
> I believe the name of the plugin you'll need is the Conditional Build Step
plugin.
>
>
> We always use the multiple step option because there doesn't seem to be a
downside to it, and it makes life much easier if you need to run more steps
on the same condition down the road.
>
>
> HTH
>
>
>
>
>
>
> ---
> G. Ann Campbell
> Systems Architect II
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
> On Fri, Aug 9, 2013 at 9:26 AM, GeertVc <geert.vancompernolle-
Ysy7NTpMcHVWk0Htik3J/[hidden email]> wrote:
> Ann,
> Could you elaborate a bit more on that one?  Not clear to me what you mean
> (and no, I don't to Maven analysis).  An example would do good as to where
> to add the conditional build step...
> TIA,
> Best rgds,
> --Geert
> -----
> Best rgds,
> --Geert
> --
> View this message in context: <a href="http://sonar.15.x6.nabble.com/Disabling- Sonar-while-running-Jenkins-tp5015920p5015922.html" target="_blank">http://sonar.15.x6.nabble.com/Disabling-
Sonar-while-running-Jenkins-tp5015920p5015922.html
>
> Sent from the Sonar user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>     http://xircles.codehaus.org/manage_email
>
>
>
>
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this
message. If you are not the addressee indicated in this message (or are not
responsible for delivery of this message to that person) , you may not copy
or deliver this message to anyone. In such case, you should destroy this
message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of
this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or
other information in this message that do not relate to the official
business of the company  or its subsidiaries.
> **********************************************************
>
>
>
>





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Disabling Sonar while running Jenkins

tobi42
In reply to this post by GeertVc
GeertVc wrote
Is it possible to temporarily disable Sonar when Jenkins is run?
[..]
Any suggestions?
Hi,

I also wanted to *temporarily* disable the sonar runners.
For me, it worked by simply disabling the plugin in the plugin manager (disable, not unistall ;-) )

Best regards
Tobi