Hi,
you should get only the appropriate job by selecting via name and then you
can get information about a part of the job like a pipeline part...may be
via the REST API ? I never tried to use this within a pipeline itself...
Kind regards
Karl Heinz Marbaise
On Wednesday, January 25, 2017 at 7:16:28 PM UTC+1, Danny Wong wrote:
>
> *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] <javascript:> 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/eb4e5992-3ba6-49e9-ace4-b40436bc2f57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.