2025-04-09 02:06:16 +00:00

45 lines
1.6 KiB
YAML

apiVersion: tekton.dev/v1
kind: Task
metadata:
name: git-clone-checkout
spec:
description: >-
These Tasks are Git tasks to work with repositories used by other tasks
in your Pipeline.
workspaces:
# - name: output
# description: The git repo will be cloned onto the volume backing this Workspace.
- name: ssh-directory
optional: true
description: |
A .ssh directory with private key, known_hosts, config, etc. Copied to
the user's home before git commands are executed. Used to authenticate
with the git remote when performing the clone. Binding a Secret to this
Workspace is strongly recommended over other volume types.
- name: basic-auth
optional: true
description: |
A Workspace containing a .gitconfig and .git-credentials file. These
will be copied to the user's home before any git commands are run. Any
other files in this Workspace are ignored. It is strongly recommended
to use ssh-directory over basic-auth whenever possible and to bind a
Secret to this Workspace over other volume types.
- name: ssl-ca-directory
optional: true
description: |
A workspace containing CA certificates, this will be used by Git to
verify the peer with when fetching or pushing over HTTPS.
params:
- name: repo-url
description: Repository URL to clone from.
type: string
- name: revision
description: Revision to checkout. (branch, tag, sha, ref, etc...)
type: string
default: ""
steps:
- name: echo
image: "alpine/git:2.47.2"
script: |
echo "Hello from Gitea Task!"