Hi guys,
I would like to retrieve all the jobs (and their name) in a
specific Jenkins pipeline. I’m looking at Jenkins api using groovy examples,
but I have not found the option.
I found this example:
// Get the list of all jobs and print them
//activeJobs = hudson.model.Hudson.instance.items.findAll{job ->
job.isBuildable()}
//activeJobs.each{run -> println(run.name)}
//println ('total number of jobs :'+ activeJobs.size())
Which gives me ALL builds and their names… I only want the builds from a
specific pipeline view. Any suggestions? Thanks!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this electronic message, including any attachments, are
intended only for the use of the individual or entity to which they are
addressed and may contain confidential information. If you are not the intended
recipient, you are hereby notified that any use, dissemination, distribution,
or copying of this message or any attachment is strictly prohibited. If you
have received this transmission in error, please send an e-mail to
[email protected] and delete this message, along with any attachments,
from your computer.
--
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/C6E1D05C-3A12-4260-BA33-81047B16EA17%40whitehatsec.com.
For more options, visit https://groups.google.com/d/optout.