21 lines
445 B
YAML
21 lines
445 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: git-clone
|
|
namespace: tekton-pipelines
|
|
spec:
|
|
workspaces:
|
|
- name: output
|
|
params:
|
|
- name: url
|
|
type: string
|
|
- name: revision
|
|
type: string
|
|
default: main
|
|
steps:
|
|
- name: clone
|
|
image: alpine/git
|
|
script: |
|
|
git clone $(params.url) $(workspaces.output.path)
|
|
cd $(workspaces.output.path)
|
|
git checkout $(params.revision) |