-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 #6383, #6139 and supports #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 [email protected]
- Loading branch information
1 parent
7c3c988
commit 61d05a7
Showing
5 changed files
with
186 additions
and
15 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
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