forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't return validation error when taskrun failed/skipped
This commit aims to fix tektoncd#6383, tektoncd#6139 and supports tektoncd#3749. This commits skip the validation if the taskrun is not successful (e.g. failed or skipped) and omit the pipelinerun coresponding result. This way the skipped taskrun won't get validation error for pipelinerun. And the pipelinerun error won't be overwritten by the validation error. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
- Loading branch information
1 parent
8e8c163
commit 474d88c
Showing
4 changed files
with
101 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pipelinerun-test | ||
spec: | ||
pipelineSpec: | ||
params: | ||
- name: say-hello | ||
default: 'false' | ||
tasks: | ||
- name: hello | ||
taskSpec: | ||
results: | ||
- name: result-one | ||
steps: | ||
- image: alpine | ||
script: | | ||
#!/bin/sh | ||
echo "Hello world!" | ||
echo -n "RES1" > $(results.result-one.path) | ||
- name: goodbye | ||
runAfter: | ||
- hello | ||
taskSpec: | ||
results: | ||
- name: result-two | ||
steps: | ||
- image: alpine | ||
script: | | ||
#!/bin/sh | ||
echo "Goodbye world!" | ||
echo -n "RES2" > $(results.result-two.path) | ||
when: | ||
- input: $(params.say-hello) | ||
operator: in | ||
values: ["true"] | ||
|
||
results: | ||
- name: result-hello | ||
description: Result one | ||
value: '$(tasks.hello.results.result-one)' | ||
- name: result-goodbye | ||
description: Result two | ||
value: '$(tasks.goodbye.results.result-two)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters