pipeline results with a failed
pipelineRun
#4279
pritidesai
started this conversation in
General
Replies: 1 comment
-
My use-case is following:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-result
spec:
tasks:
- name: generate
taskSpec:
results:
- name: url
steps:
- name: generate
image: registry.access.redhat.com/ubi8/ubi-minimal
script: |
# in real world this task would have a param that we would set to $(context.pipelineRun.name)
# the script would then remove the generated suffix from pipeline run name and would construct the string with current timestamp
echo "https://artifacts.mycompany.com/mypipelinerun/210908-111711/" > $(results.url.path)
echo "Done"
- name: test-suite-1
runAfter:
- generate
taskSpec:
steps:
- name: test
image: registry.access.redhat.com/ubi8/ubi-minimal
script: |
# in real world this task would have a param with result of the first task
echo "Done"
- name: test-suite-2
runAfter:
- generate
taskSpec:
steps:
- name: test
image: registry.access.redhat.com/ubi8/ubi-minimal
script: |
# in real world this task would have a param with result of the first task
echo "Done"
finally:
- name: cleanup
taskSpec:
steps:
- name: cleanup
image: registry.access.redhat.com/ubi8/ubi-minimal
script: |
echo "Done"
results:
- name: artifacts-url
value: $(tasks.generate.results.url) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The pipeline results are not published when a pipelineRun fails. The pipeline results could have a reference to a successful task with a task result but any subsequent task failure stops publishing the pipeline results.
This is addressing the comment here and part of issue #3749.
This pipeline has a result reference
image-a
to a task resultimage
of the first task but sincetask-b
results in failure, the pipeline results are not published. The taskRun for the first task does have a task result initialized.pipeline result is empty:
kubectl get pr pipelinerun-result-k6drq -o json | jq .status.pipelineResults null
task result is initialized:
The concern here is the result is initialized in the taskRun but not propagated to the pipelineRun status. I have pinged @ppitonak for more real world use case to share.
I think its safe here to unblock pipeline result if the task result is initialized in the taskRun.
EDIT: This task result
$(tasks.task-a.results.image)
is allowed to be consumed by any subsequent task until a failure is hit and at the same time the same task result does not make it to the pipeline result which is inconsistent.Beta Was this translation helpful? Give feedback.
All reactions