我有一个 TektonPipeline
和PipelineRun
定义。但是,我无法Pipeline
通过传递参数实现运行。
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: build-deploy-
labels:
tekton.dev/pipeline: build-deploy
spec:
serviceAccountName: tekton-build-bot
pipelineRef:
name: build-deploy
params:
- name: registry-address
value: $(REG_ADDRESS)
- name: repo-address
#value: $(REPO_ADDRESS)
value: $(REPO_ADDRESS)
- name: repo-name
value: $(REPO_NAME)
- name: version
value: $(VERSION)
workspaces:
- name: source
persistentVolumeClaim:
claimName: my-pvc
尝试使用以下命令运行该运行器时如何传递参数kubectl create -f pipelinerun.yaml
?
例子:
value: $(REG_ADDRESS)
-> 我想在运行管道之前传递注册表地址,而不是提供硬编码常量。
有任何想法吗?