-
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.
docs: optimize examples for propagating results
The propagate results only works for the embedded tasks, not for the referenced tasks.
- Loading branch information
Showing
2 changed files
with
27 additions
and
34 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
50 changes: 23 additions & 27 deletions
50
examples/v1/pipelineruns/propagating_results_implicit_resultref.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 |
---|---|---|
@@ -1,34 +1,30 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: Task | ||
metadata: | ||
name: uid-task | ||
spec: | ||
results: | ||
- name: uid | ||
type: string | ||
steps: | ||
- name: uid | ||
image: busybox | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- echo "1001" | tee $(results.uid.path) | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: uid-pipeline-run | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: add-uid | ||
taskRef: | ||
name: uid-task | ||
- name: show-uid | ||
taskSpec: | ||
steps: | ||
- name: show-uid | ||
image: busybox | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- echo | ||
- $(tasks.add-uid.results.uid) | ||
- name: add-uid | ||
taskSpec: | ||
results: | ||
- name: uid | ||
type: string | ||
steps: | ||
- name: add-uid | ||
image: busybox | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- echo "1001" | tee $(results.uid.path) | ||
- name: show-uid | ||
# params: | ||
# - name: uid | ||
# value: $(tasks.add-uid.results.uid) | ||
taskSpec: | ||
steps: | ||
- name: show-uid | ||
image: busybox | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- echo $(tasks.add-uid.results.uid) | ||
# - echo $(params.uid) |