-
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.
- Loading branch information
1 parent
44ccf4d
commit a8946d4
Showing
20 changed files
with
1,000 additions
and
494 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,79 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
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/v1beta1 | ||
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: $(params.third) | ||
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) | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: sum-three-pipeline-run | ||
spec: | ||
pipelineRef: | ||
name: sum-three-pipeline | ||
params: | ||
- name: first | ||
value: "2" | ||
- name: second | ||
value: "10" | ||
- name: third | ||
value: "10" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.