0

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

yonSon
  • 3
  • 4

1 Answers1

0

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

  • Thanks for answer. However, that link only describes accessing the job info of the last build or last successful build. In my scenario: job number 1 is run. 50 builds can be run following that for example. Then, I want to retrigger the first build. The last build returned will be number 51. I need the job info of the actual build which retriggered build 1 (the retriggered build will be 52). – yonSon Jul 19 '20 at 11:01