Adding
params:
- name: pipelineRunName
value: "$(context.pipelineRun.name)"
to a task under finally in a pipeline should pass the name of the pipeline run to that task.
Instead, the value passed to the task is $(context.pipelineRun.name)
finally block.$(context.pipelineRun.name)Kubernetes version:
Output of kubectl version:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:18:29Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
$ kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
v0.14.0
I've confirmed this feature works for a task not inside a finally block. It looks like the combination of these two new features aren't working together.
@mike1451 I think it should be fixed by https://github.com/tektoncd/pipeline/pull/2908 — which will be in 0.14.1 :pray:
yup just validated, should be fixed with #2908
finally:
- name: echo-pipeline-run-name
taskRef:
name: echo-task
params:
- name: a
value: "$(context.pipelineRun.name)"
@mike1451 let me know once you verify, I will close this issue.
/close
@vdemeester: Closing this issue.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.