From 597c4d2c5b53aefc73f467ba0cdce7b1fe099502 Mon Sep 17 00:00:00 2001 From: qingliu Date: Wed, 10 Jan 2024 15:58:17 +0800 Subject: [PATCH] docs: optimize examples for propagating results The previous example did not actually output results, leading to the misconception that it was not effective. --- docs/pipelineruns.md | 11 ++++------- .../propagating_results_implicit_resultref.yaml | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/pipelineruns.md b/docs/pipelineruns.md index 1fd3a008537..730b54948e6 100644 --- a/docs/pipelineruns.md +++ b/docs/pipelineruns.md @@ -792,9 +792,8 @@ spec: image: busybox command: ["/bin/sh", "-c"] args: - - echo - # - $(params.uid) - - $(tasks.add-uid.results.uid) + - echo $(tasks.add-uid.results.uid) + # - echo $(params.uid) ``` On executing the `PipelineRun`, the `Results` will be interpolated during resolution. @@ -809,8 +808,7 @@ spec: taskSpec: steps: args: - echo - 1001 + echo 1001 command: - /bin/sh - -c @@ -831,8 +829,7 @@ status: taskSpec: steps: args: - echo - 1001 + echo 1001 command: /bin/sh -c diff --git a/examples/v1/pipelineruns/propagating_results_implicit_resultref.yaml b/examples/v1/pipelineruns/propagating_results_implicit_resultref.yaml index 35c086393c6..d0a16eae5ab 100644 --- a/examples/v1/pipelineruns/propagating_results_implicit_resultref.yaml +++ b/examples/v1/pipelineruns/propagating_results_implicit_resultref.yaml @@ -30,5 +30,4 @@ spec: image: busybox command: ["/bin/sh", "-c"] args: - - echo - - $(tasks.add-uid.results.uid) \ No newline at end of file + - echo $(tasks.add-uid.results.uid)