Require a downstream job to use the same commit as its parent

If job โ€œBโ€ is downstream of โ€œAโ€ and both are retrieved from the same git repository, how can you guarantee that assembly B initiated by assembly A uses the same commit even if new commits were made to the repository, when was the "A" built?

The answer to this post suggests using the copy-artifact plugin, but there seems to be an easier way to just instruct task โ€œBโ€ to โ€œuse this exact hash for this build.โ€

+4
source share
1 answer

You need a parameterized trigger plugin for jenkins installed using the Git plugin, which you probably already installed. It allows you to specify the Git SHA1 commit id for the next build as a predefined parameter.

+2
source

Source: https://habr.com/ru/post/1485086/


All Articles