How to get upstream/downstream job info using Groovy Scripts ?

589 views
Skip to first unread message

Shafi ulla

unread,
Oct 6, 2015, 12:17:07 PM10/6/15
to Jenkins Users
Am looking for groovy script
given the job name as input,
output : to list its upstream or downstream jobs.

Any suggestion on how to do this ?

Baptiste Mathus

unread,
Oct 7, 2015, 2:37:09 AM10/7/15
to jenkins...@googlegroups.com

Hi,
This is going to be very simple if you have some general have knowledge.

In the groovy script, start with something along Jenkins.instance. getItem(yourJobName) that will return a job instance.

Then look through the public javadoc to find what you want.

Hope it'll get you started.

Cheers

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fd15dff5-e221-414c-a0c7-d63051892c93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Oct 7, 2015, 2:39:58 AM10/7/15
to jenkins...@googlegroups.com


Le 7 oct. 2015 8:36 AM, "Baptiste Mathus" <m...@batmat.net> a écrit :
>
> Hi,
> This is going to be very simple if you have some general have knowledge.

Hum. F You Autocorrect. I meant "Java knowledge".

Reply all
Reply to author
Forward
0 new messages