If job "B" is downstream of job "A" and both draw from the same git repository, how can one ensure that the build of B triggered by a build of A uses the same commit, even if new commits have been made to the repository while "A" was building?
The answer to this post suggests using the copy-artifact plugin, but it seems like there ought to be an easier way to just instruct job "B" to "use this exact commit hash for this build."
You need the parameterized trigger plugin for jenkins, installed along the Git plugin that you probably already have installed. It allows to specify Git SHA1 commit id for next build as predefined parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With