Thanks a lot Dirk, I was trying to write this on notepad without the
scriptconsole (we also don't use sonar and i didn't have an instance
available on my personal machine)

On Tue, May 26, 2020 at 6:31 AM 'Dirk Heinrichs' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Am Samstag, den 23.05.2020, 18:43 -0700 schrieb Vijay Gongle:
>
> We have plenty of Jenkins job and most of them are running with SonarQube
> for analysis.
>
> How to find out; how many such jobs are running with SonarQube ?
>
>
> This is derived from a script I've used in the past to modify all
> Artifactory wrappers in all our jobs:
>
> import hudson.model.*
> import hudson.plugins.sonar.*
> import jenkins.model.*
>
> // Iterate over all jobs
> Jenkins.instance.getAllItems(AbstractProject.class).each {job ->
>   def fName = job.getFullName()
>
>   // Iterate over all build wrappers
>   for (wrapper in job.getBuildWrappersList()) {
>   if (wrapper instanceof SonarBuildWrapper) {
>   println(fName + ' has SonarQube configuration.')
>   }
>   }
> }
> println('Done.')
>
>
> Paste it into the Script Console and see how it works. We don't use
> SonarCube ourselves, so it may work or not, but it should point you into
> the right direction.
>
> HTH...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/53911cd297f0aa4bcedeac64a755e8a6aaeddcd4.camel%40opentext.com
> <https://groups.google.com/d/msgid/jenkinsci-users/53911cd297f0aa4bcedeac64a755e8a6aaeddcd4.camel%40opentext.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JujcuDk%2BU1kni9TCYUwgNSDVteAJnQNQ3eeNcfNiAp2Q%40mail.gmail.com.

Reply via email to