Is there a way for downstream job to get upstream job details such as upstream job name and upstream job build number without modifying upstream job

18 views
Skip to first unread message

pavan kumar juturu

unread,
Sep 7, 2017, 8:42:45 PM9/7/17
to Jenkins Users
Hi,

I have upstream jobs say JobA, JobB and JobC and downstream job say JobX.

In downstream job (JobX), I want to use Build Trigger as "Build after other projects are built" and specify the upstream jobs (JobA, JobB and JobC) to trigger the downstream job JobX.
However in this case, I would like to know which of the upstream job (JobA or JobB or JobC?) triggered this down stream job and what is the upstream job build number?

I can achieve this if I modify all the upstream jobs in "post build action" and specify the "Trigger parameterized build on other projects" and specify downstream job JobX along with upstream job name and build number as params. However, I do not want to change upstream job as it is owned by a different team.

Thanks,
Pavan
Reply all
Reply to author
Forward
0 new messages