-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Expected Behavior
I can assign params with task results to other task value:
params:
- name: arg
value: "$(params.prefix):$(tasks.generate-suffix.results.suffix)"
Actual Behavior
Cannot assign params with task results to other task value. Error message is generated:
validation failed: invalid value: Invalid result reference expression: Must be of the form \"tasks.<taskName>.results.<resultName>\": spec.tasks.params.value
Steps to Reproduce the Problem
pipeline.yaml:
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: test-
spec:
params:
- name: prefix
value: prefix
pipelineSpec:
params:
- name: prefix
tasks:
- name: generate-suffix
taskSpec:
results:
- name: suffix
steps:
- name: generate-suffix
image: alpine
script: |
echo "suffix" > $(results.suffix.path)
- name: do-something
runAfter:
- generate-suffix
taskSpec:
params:
- name: arg
steps:
- name: do-something
image: alpine
script: |
echo "$(params.arg)"
params:
- name: arg
value: "$(params.prefix):$(tasks.generate-suffix.results.suffix)"
Executing this pipelinerun generates error message:
{"level":"warn","logger":"tekton.pipeline-controller","caller":"pipelinerun/pipelinerun.go:193","msg":"Failed to update PipelineRun status{error 25 0 admission webhook \"validation.webhook.pipeline.tekton.dev\" denied the request: validation failed: invalid value: Invalid result reference expression: Must be of the form \"tasks.<taskName>.results.<resultName>\": spec.tasks.params.value}","commit":"82e2758","knative.dev/controller":"pipeline-controller"}
{"level":"error","logger":"tekton.pipeline-controller","caller":"controller/controller.go:376","msg":"Reconcile error","commit":"82e2758","knative.dev/controller":"pipeline-controller","error":"1 error occurred:\n\t* admission webhook \"validation.webhook.pipeline.tekton.dev\" denied the request: validation failed: invalid value: Invalid result reference expression: Must be of the form \"tasks.<taskName>.results.<resultName>\": spec.tasks.params.value\n\n","stacktrace":"github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller.(*Impl).handleErr\n\tgithub.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:376\ngithub.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tgithub.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:362\ngithub.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller.(*Impl).Run.func2\n\tgithub.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:310"}
Additional Info
-
Kubernetes version:
Output of
kubectl version:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T23:41:24Z", GoVersion:"go1.14", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.11-gke.1", GitCommit:"aa93664bafe74f3c051e021b27a64e28ac34ab40", GitTreeState:"clean", BuildDate:"2020-03-18T22:49:35Z", GoVersion:"go1.12.17b4", Compiler:"gc", Platform:"linux/amd64"}
-
Tekton Pipeline version:
Output of
tkn versionorkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
Client version: 0.8.0
Pipeline version: v0.11.1
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.