-
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.
- Loading branch information
1 parent
ea3a47f
commit 0594c4e
Showing
1 changed file
with
96 additions
and
0 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
tekton-catalog/pipeline-loops/examples/pipelinespec-with-nested-loop-embedded.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,96 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pr-loop-example | ||
labels: | ||
mylooplabels: mylooplabels | ||
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: loop-task-inner | ||
runAfter: | ||
- echo-loop-task | ||
params: | ||
- name: message | ||
value: | ||
- I am the inner first one | ||
- I am the inner second 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" |