Yep, see the below steps:
1) Go to your script console in jenkins: http://yourJenkinsUrl/script
2) List jobs
Jenkins.instance?.items.each { println it.name }
3) List jobs with post build actions
Jenkins.instance?.items.findAll { it.getPublishersList() != null && it.
getPublishersList().size() > 0 }.each { println it.name }
4) Look for the Groovy Post Build actions class
Look
at:
https://github.com/jenkinsci/groovy-postbuild-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java#L60
5) List jobs with Groovy Post Build actions
Jenkins.instance?.items.findAll { it.getPublishersList() != null && it.
getPublishersList().size() > 0 && it.getPublishersList()?.get(org.jvnet.
hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.class) }.each {
println it.name }
I hope it helps
Cheers
On Friday, 12 February 2016 09:54:54 UTC, [email protected] wrote:
>
> Hi,
>
> I want to know if there is way I can list all Jenkins jobs that are having
> "Groovy post build script" plug-in enabled for them.
>
> Please let know if there is any way I can do this.
>
>
> Thanks,
> valnci
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/67cb2b99-d98a-45d2-bb38-5241237ad22b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.