-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pipelineloop) : Support latest tektoncd pipeline version. (#602)
* Support latest tektoncd pipeline version. * update readme for support latest tektoncd pipeline version.
- Loading branch information
1 parent
7c42346
commit 052726a
Showing
7 changed files
with
255 additions
and
32 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
61 changes: 61 additions & 0 deletions
61
tekton-catalog/pipeline-loops/examples/loop-example-basic_taskspec.yaml
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,61 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pr-loop-example | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: first-task | ||
taskSpec: | ||
steps: | ||
- name: echo | ||
image: ubuntu | ||
imagePullPolicy: IfNotPresent | ||
script: | | ||
#!/usr/bin/env bash | ||
echo "I am the first task before the loop task" | ||
- name: loop-task | ||
runAfter: | ||
- first-task | ||
params: | ||
- name: message | ||
value: | ||
- I am the first one | ||
- I am the second one | ||
- I am the third one | ||
taskSpec: | ||
apiVersion: custom.tekton.dev/v1alpha1 | ||
kind: PipelineLoop | ||
spec: | ||
iterateParam: message | ||
pipelineSpec: | ||
params: | ||
- name: message | ||
type: string | ||
tasks: | ||
- name: echo-loop-task | ||
params: | ||
- name: message | ||
value: $(params.message) | ||
taskSpec: | ||
params: | ||
- name: message | ||
type: string | ||
steps: | ||
- name: echo | ||
image: ubuntu | ||
imagePullPolicy: IfNotPresent | ||
script: | | ||
#!/usr/bin/env bash | ||
echo "$(params.message)" | ||
- name: last-task | ||
runAfter: | ||
- loop-task | ||
taskSpec: | ||
steps: | ||
- name: echo | ||
image: ubuntu | ||
imagePullPolicy: IfNotPresent | ||
script: | | ||
#!/usr/bin/env bash | ||
echo "I am the last task after the loop task" |
58 changes: 58 additions & 0 deletions
58
tekton-catalog/pipeline-loops/examples/simplepipelineloop_taskspec.yaml
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,58 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: simpletask | ||
spec: | ||
params: | ||
- name: word | ||
type: string | ||
- name: suffix | ||
type: string | ||
steps: | ||
- name: echo | ||
image: ubuntu | ||
script: | | ||
#!/usr/bin/env bash | ||
echo "$(params.word)$(params.suffix)" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: demo-pipeline | ||
spec: | ||
params: | ||
- name: word | ||
default: "wordi" | ||
- name: suffix | ||
default: "suffixi" | ||
tasks: | ||
- name: simplepipelinetask | ||
taskRef: | ||
name: simpletask | ||
params: | ||
- name: word | ||
value: $(params.word) | ||
- name: suffix | ||
value: $(params.suffix) | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Run | ||
metadata: | ||
name: simpletasklooprun02 | ||
spec: | ||
params: | ||
- name: word | ||
value: | ||
- jump | ||
- land | ||
- roll | ||
- name: suffix | ||
value: ing | ||
spec: | ||
apiVersion: custom.tekton.dev/v1alpha1 | ||
kind: PipelineLoop | ||
spec: | ||
pipelineRef: | ||
name: demo-pipeline | ||
iterateParam: word | ||
timeout: 60s |
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