Hi Jan/Dirk,
Tweaking the script worked in charm. Below is the perfectly working script
which gives me the results for any job that has sonarqube integrated or
sonar quality gates integrated.
It might help someone who is in similar boat. I thank a lot lot to you both
for leading me in right direct
Am Mittwoch, den 27.05.2020, 21:33 -0500 schrieb Jan Monterrubio:
> Try printing like this:
> println(“${job.getFullName()} has soñar configuration”)
The script already has a line for this.
Bye...
Dirk
--
Dirk HeinrichsSenior Systems Engineer, Delivery PipelineOpenText ™ Discovery |
Recomm
Try printing like this:
println(“${job.getFullName()} has soñar configuration”)
It’s groovy interpolation. If that doesn’t work maybe just job.getName
might do it.
On Wed, May 27, 2020 at 15:27 Vijay Gongle wrote:
> Hi Jan/Dirk,
> I used the below script and I'm getting all the plugins list th
Hi Jan/Dirk,
I used the below script and I'm getting all the plugins list that jobs are
using but not the actual job name. Can you please help me how to tweak it.
When I run the below script I get the results which shows "
org.quality.gates.jenkins.plugin.QGPublisher@75f89c52" along with other
suc
Am Dienstag, den 26.05.2020, 12:51 -0400 schrieb Vijay Gongle:
> I ran the above script and I get the below result with two of the job
> names which has SonarQube configurations. But I'm sure there are even
> more.
>
> Result* has SonarQube configuration.* has SonarQube
> configuration.g
> Do I have to run it separately or it can be combined in the above
script?
you can combine it:
if (buildWrappersList() { // the logic for the build wrappers }
if (publishersList() { // find sonar publisher }
On Tue, May 26, 2020 at 10:06 PM Vijay Gongle wrote:
> Thanks a lot Jan and Dirk.
That looks like it would be in the set of Publishers?
https://javadoc.jenkins.io/plugin/maven-plugin/hudson/maven/MavenModuleSet.html#getPublishers--
So maybe try iterating through the publishers and if one of them is an
instance of hudson.plugins.sonar.SonarPublisher , then you found another
thin
Thanks a lot Jan and Dirk. The below script worked for about 50%. Looking
at the results, found that there are missing parts.
import hudson.model.*
import hudson.plugins.sonar.*
import jenkins.model.*
// Iterate over all jobs
Jenkins.instance.getAllItems(AbstractProject.class).each {job ->
def f
It seems that we do something like this to check if its gonna respond to
that method:
if(project.respondsTo('getBuildWrappersList')) { // do other things here }
MavenModuleSet doesn't have a buildWrappersList:
https://javadoc.jenkins.io/plugin/maven-plugin/hudson/maven/MavenModule.html
MavenModule
Ya sure, I haven't tweaked it honestly as I'm not aware of Groovy. So I
have pasted the below script provided by Drik.
import hudson.model.*
import hudson.plugins.sonar.*
import jenkins.model.*
// Iterate over all jobs
Jenkins.instance.getAllItems(AbstractProject.class).each {job ->
def fName =
at Script1.run(Script1.groovy:6)
do you mind copy pasting your script here so we can check it out (with
whatever modifications you have).
Based on what Dirk said, you might have to tweak it:
"Paste it into the Script Console and see how it works. We don't use
SonarCube ourselves, so it m
All the jobs has similar configurations for SonarQube as posted in the
above config.xml
It throws the below error:
groovy.lang.MissingMethodException: No signature of method:
hudson.maven.MavenModule.getBuildWrappersList() is applicable for
argument types: () values: []
at
org.codehaus.gr
Looks like the script died after some job, can you print it’s name and
check it’s config? Maybe we need to add a null check before we try to call
getBuildWrapperList or the config type is doffeeent!
On Tue, May 26, 2020 at 11:51 Vijay Gongle wrote:
> Thank you Drik/Jan.
> I ran the above script
Thank you Drik/Jan.
I ran the above script and I get the below result with two of the job names
which has SonarQube configurations. But I'm sure there are even more.
Result
* has SonarQube configuration.
* has SonarQube configuration.
groovy.lang.MissingMethodException: No signature of m
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, d
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
A
Can you post the config xml for one of the jobs? Hitting the config.xml
should let us see what props there are.
On Sun, May 24, 2020 at 11:12 Vijay Gongle wrote:
> Thank you for responding.
> Can you help me completing the query;
>
> I would like to fetch the jobs which has the check mark "Prepa
> Thank you for responding.
> Can you help me completing the query;
>
> I would like to fetch the jobs which has the check mark "Prepare SonarQube
> Scanner environment" in Build Environment as shown below:
>
>
>
> Thanks,
> Vijay
>
>
>> On Sat, May 23, 2020 at 11:09 PM Jan Monterrubio
Thank you for responding.
Can you help me completing the query;
I would like to fetch the jobs which has the check mark "Prepare SonarQube
Scanner environment" in Build Environment as shown below:
[image: image.png]
Thanks,
Vijay
On Sat, May 23, 2020 at 11:09 PM Jan Monterrubio
wrote:
> You
You could iterate over the list of jobs and get the configuration traits
for them, and check if they have sonar cube, something like
Jenkins.getInstance().items.each { it ->
it.configuration?.steps // not sure what XML type the sonar cube step is,
if it has a step
}
On Sat, May 23, 2020 at 8:43
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 ?
Thanks
Vijay
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from thi
21 matches
Mail list logo