Can I get the build info of the build which retriggerd the current job?

228 Views Asked by At

I have a job hooked to a gerrit server. I've also got the gerrit trigger plugin installed.

When I press "retrigger"/"retrigger all", I want the retriggered job to get the build number of the job which retriggered it.

Any ideas on how to do this? Thanks

1

There are 1 best solutions below

1
On

If you retrigger a job if you check in the JOB info, you will see jenkins track that. This is one way: https://medium.com/faun/how-to-get-jenkins-build-job-details-b8c918087030