2bb049e125
- Update the pipeline to install for e2e tests - Update images to refer to 0.14.0 version of pipeline Signed-off-by: Vincent Demeester <vdemeest@redhat.com> |
||
---|---|---|
.. | ||
samples | ||
tests | ||
git-batch-merge.yaml | ||
README.md |
Git Task
This Task
is Git task to work with repositories used by other tasks
in your Pipeline.
git-batch-merge
This task takes a set of refspecs, fetches them and performs git operations (cherry-pick or merge) to apply them in order on the given base revision (default master). The resulting commit SHA will not match across taskruns, but the git tree SHA should match. This can be useful for batch testing changes, for example, when you want to batch up your PRs into a single merge by taking the HEAD of the branch you want to merge to, and adding all the PRs to it. This concept is used in tools such as [Tide][tide] to batch test PR's, and [Zuul CI Gating][zuul-ci], to perform speculative execution of PR's/change requests individually
This Task
has four required inputs:
- The URL of a git repo to clone provided with the
url
param. - A space separated string of refs
BatchedRefs
to fetch and batch over the givenrevision
- Merge
mode
to use while batching (merge, merge-resolve, merge-squash, cherry-pick) - A Workspace called
output
.
There are 4 additional parameters in addition to the ones mentioned above for the git-clone task:
- batchedRefs: space separated git [refnames][git-ref] to fetch and batch on top of revision using the given mode (must be a valid refs, no commit SHA's).
- mode: Batch mode to select (default: merge)
merge
: corresponds to git merge -s recursive. This is the default mode used by github
cherry-pick
: corresponds to git cherry-pick
See [git-merge][git-merge] and [git-cherry-pick][git-cherry-pick] - gitUserName: git user name to use for creating the batched commit (First Last) (default: GitBatch Task). See [git-user-config][git-user-config]
- gitUserEmail: git user email to use for creating the batched commit (First.Last@domain.com) (default: GitBatch.Task@tekton.dev). See [git-user-config][git-user-config]
Results
- commit: The precise commit SHA that was fetched by this Task
- tree: The [git tree][git-tree] object SHA that was created after batch merging the refs on HEAD.
Usage
git-ref git-merge git-cherry-pick git-user-config git-tree tide zuul-ci