-
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.
Fix Crash due to Matrix Validation in non Matrix Pipeline
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: Task | ||
metadata: | ||
name: add-task | ||
spec: | ||
params: | ||
- name: first | ||
description: the first operand | ||
- name: second | ||
description: the second operand | ||
results: | ||
- name: sum | ||
description: the sum of the first and second operand | ||
steps: | ||
- name: add | ||
image: alpine | ||
env: | ||
- name: OP1 | ||
value: $(params.first) | ||
- name: OP2 | ||
value: $(params.second) | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- echo -n $((${OP1}+${OP2})) | tee $(results.sum.path); | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: sum-three-pipeline | ||
spec: | ||
params: | ||
- name: first | ||
description: the first operand | ||
- name: second | ||
description: the second operand | ||
- name: third | ||
description: the third operand | ||
tasks: | ||
- name: first-add | ||
taskRef: | ||
name: add-task | ||
params: | ||
- name: first | ||
value: $(params.first) | ||
- name: second | ||
value: $(params.second) | ||
- name: second-add | ||
taskRef: | ||
name: add-task | ||
params: | ||
- name: first | ||
value: $(tasks.first-add.results.sum) | ||
- name: second | ||
value: $(tasks.first-add.results.sum) - $(sum) | ||
results: | ||
- name: sum | ||
description: the sum of all three operands | ||
value: $(tasks.second-add.results.sum) | ||
- name: partial-sum | ||
description: the sum of first two operands | ||
value: $(tasks.first-add.results.sum) | ||
- name: all-sum | ||
description: the sum of everything | ||
value: $(tasks.second-add.results.sum)-$(tasks.first-add.results.sum) |
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,14 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: resultRefRun | ||
spec: | ||
pipelineRef: | ||
name: sum-three-pipeline | ||
params: | ||
- name: first | ||
value: "2" | ||
- name: second | ||
value: "10" | ||
- name: third | ||
value: "10" |