7.4 示例3
- 添加Task,生成Build ID,并将之作为Image的标签
root@k8s-master01:~/tekton-and-argocd-in-practise/04-tekton-pipeline-in-practise/03-s2i-auto-gen-build-id# cat 01-task-git-clone.yaml
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: git-clone
spec:
description: Clone the code repository to the workspace.
params:
- name: url
type: string
description: git url to clone
default: ""
- name: branch
type: string
description: git branch to checkout
default: "main"
workspaces:
- name: source