1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-10-18 02:19:26 +00:00
catalog/task/git-clone/0.3
Yulia Gaponenko f4708d478e Add linux/amd64 platform annotation to the rest of the tasks
At this moment all tasks which can be executed on linux/s390x or
linux/ppc64le are tested and labelled accordingly.
The rest of the tasks can be labelled as `linux/amd64`, which
is default platform and where tasks are already tested via
default PR testing cycle.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-10-29 17:08:38 +01:00
..
samples Add pr checkout sample for git-clone task 2021-04-14 12:52:41 +01:00
tests add sparse checkout and bump to 0.3 2021-02-26 14:40:44 +00:00
git-clone.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-clone

Please Note: this Task is only compatible with Tekton Pipelines versions 0.21.0 and greater!

This Task has two required inputs:

  1. The URL of a git repo to clone provided with the url param.
  2. A Workspace called output.

The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. If the directory where the repo will be cloned is already populated then by default the contents will be deleted before the clone takes place. This behaviour can be disabled by setting the deleteExisting param to "false". This task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to the sparseCheckoutDirectories param.

This Task does the job of the legacy GitResource PipelineResource and is intended as its replacement. This is part of our plan to offer replacement Tasks for Pipeline Resources as well as document those replacements.

Workspaces

  • output: A workspace for this Task to fetch the git repository in to.

Parameters

  • url: git url to clone (required)
  • revision: git revision to checkout (branch, tag, sha, ref…) (default: "")
  • refspec: git refspec to fetch before checking out revision (default:"")
  • submodules: defines if the resource should initialize and fetch the submodules (default: true)
  • depth: performs a shallow clone where only the most recent commit(s) will be fetched (default: 1)
  • sslVerify: defines if http.sslVerify should be set to true or false in the global git config (default: true)
  • subdirectory: subdirectory inside the "output" workspace to clone the git repo into (default: "")
  • deleteExisting: clean out the contents of the repo's destination directory if it already exists before cloning the repo there (default: true)
  • httpProxy: git HTTP proxy server for non-SSL requests (default: "")
  • httpsProxy: git HTTPS proxy server for SSL requests (default: "")
  • noProxy: git no proxy - opt out of proxying HTTP/HTTPS requests (default: "")
  • verbose: log the commands that are executed during git-clone's operation (default: true)
  • sparseCheckoutDirectories: which directories to match or exclude when performing a sparse checkout (default: "")
  • gitInitImage: the image used where the git-init binary is (default: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.21.0")

Results

  • commit: The precise commit SHA that was fetched by this Task
  • url: The precise URL that was fetched by this Task

Platforms

The Task can be run on linux/amd64 platform.

Usage

If the revision is not provided in the param of the taskrun then it will auto-detect the branch as specified by the default in the respective git repository.

The following pipelines demonstrate usage of the git-clone Task: