5

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."

4

1 回答 1

2

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.

于 2013-06-07T17:06:04.660 回答