1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/git-batch-merge/0.1
Lee Bernick 5e1f510bb4 Use latest release for e2e tests
This commit updates the catalog e2e tests to use the latest Pipelines release.
Because this release removes support for v1alpha1 Task, TaskRun, Pipeline, and
PipelineRun, and the previous release removes support for Conditions, this
commit also updates tests to use up-to-date versions of Tekton CRDs.
It does not update any catalog Tasks or Pipelines.
2022-07-28 03:07:31 +01:00
..
tests Use latest release for e2e tests 2022-07-28 03:07:31 +01:00
git-batch-merge.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +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.

Platforms

The Task can be run on linux/amd64 platform.

Usage

git-ref git-merge git-cherry-pick git-user-config git-tree tide zuul-ci