1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-26 06:23:37 +00:00
catalog/task/git-batch-merge/0.1
2020-07-16 18:35:59 +01:00
..
samples Modifies directory names based on the proposal 2020-07-14 19:01:58 +01:00
tests Fix git batch merge tests 2020-07-16 18:35:59 +01:00
git-batch-merge.yaml This patch splits git-batch-merge task from the git directory 2020-07-13 13:41:58 +01:00
README.md This patch splits git-batch-merge task from the git directory 2020-07-13 13:41:58 +01:00

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:

  1. The URL of a git repo to clone provided with the url param.
  2. A space separated string of refs BatchedRefs to fetch and batch over the given revision
  3. Merge mode to use while batching (merge, merge-resolve, merge-squash, cherry-pick)
  4. 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