From e5f61559d5a9e90e210c4d0635948e6e2cb09b96 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Wed, 7 Dec 2022 08:00:47 +0000 Subject: [PATCH] use nunjucks "square bracket syntax" for steps in docs Signed-off-by: Brian Fletcher --- docs/features/software-catalog/descriptor-format.md | 2 +- docs/features/software-templates/adding-templates.md | 2 +- .../migrating-from-v1beta2-to-v1beta3.md | 10 +++++----- docs/features/software-templates/writing-templates.md | 10 +++++----- .../default-app/examples/template/template.yaml | 6 +++--- .../sample-templates/bitbucket-demo/template.yaml | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/features/software-catalog/descriptor-format.md b/docs/features/software-catalog/descriptor-format.md index 27b26659cf..be71c9d174 100644 --- a/docs/features/software-catalog/descriptor-format.md +++ b/docs/features/software-catalog/descriptor-format.md @@ -703,7 +703,7 @@ spec: name: Register action: catalog:register input: - repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}' + repoContentsUrl: '{{ steps["publish"].output.repoContentsUrl }}' catalogInfoPath: '/catalog-info.yaml' ``` diff --git a/docs/features/software-templates/adding-templates.md b/docs/features/software-templates/adding-templates.md index e8176a688b..e11dad2acb 100644 --- a/docs/features/software-templates/adding-templates.md +++ b/docs/features/software-templates/adding-templates.md @@ -76,7 +76,7 @@ spec: name: Register action: catalog:register input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + repoContentsUrl: ${{ steps["publish"].output.repoContentsUrl }} catalogInfoPath: '/catalog-info.yaml' ``` diff --git a/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3.md b/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3.md index a2277e096c..c36f02a3df 100644 --- a/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3.md +++ b/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3.md @@ -169,14 +169,14 @@ These should be moved to `links` under the `output` object instead. ```diff output: -- remoteUrl: '{{ steps.publish.output.remoteUrl }}' -- entityRef: '{{ steps.register.output.entityRef }}' +- remoteUrl: '{{ steps["publish"].output.remoteUrl }}' +- entityRef: '{{ steps["register"].output.entityRef }}' + links: + - title: Repository -+ url: ${{ steps.publish.output.remoteUrl }} ++ url: ${{ steps["publish"].output.remoteUrl }} + - title: Open in catalog + icon: catalog -+ entityRef: ${{ steps.register.output.entityRef }} ++ entityRef: ${{ steps["register"].output.entityRef }} ``` @@ -206,7 +206,7 @@ Alternatively, it's possible to keep the `dash-case` syntax and use brackets for ```yaml input: - repoUrl: ${{ steps['my-custom-action'].output.repoUrl }} + repoUrl: ${{ steps["my-custom-action"].output.repoUrl }} ``` ### Summary diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 826121bd02..d53ce3716c 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -88,17 +88,17 @@ spec: name: Register action: catalog:register input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + repoContentsUrl: ${{ steps["publish"].output.repoContentsUrl }} catalogInfoPath: '/catalog-info.yaml' # some outputs which are saved along with the job for use in the frontend output: links: - title: Repository - url: ${{ steps.publish.output.remoteUrl }} + url: ${{ steps["publish"].output.remoteUrl }} - title: Open in catalog icon: catalog - entityRef: ${{ steps.register.output.entityRef }} + entityRef: ${{ steps["register"].output.entityRef }} ``` Let's dive in and pick apart what each of these sections do and what they are. @@ -505,10 +505,10 @@ The main two that are used are the following: output: links: - title: Repository - url: ${{ steps.publish.output.remoteUrl }} # link to the remote repository + url: ${{ steps["publish"].output.remoteUrl }} # link to the remote repository - title: Open in catalog icon: catalog - entityRef: ${{ steps.register.output.entityRef }} # link to the entity that has been ingested to the catalog + entityRef: ${{ steps["register"].output.entityRef }} # link to the entity that has been ingested to the catalog ``` ## The templating syntax diff --git a/packages/create-app/templates/default-app/examples/template/template.yaml b/packages/create-app/templates/default-app/examples/template/template.yaml index 50052b7a7c..39c5d2326f 100644 --- a/packages/create-app/templates/default-app/examples/template/template.yaml +++ b/packages/create-app/templates/default-app/examples/template/template.yaml @@ -61,14 +61,14 @@ spec: name: Register action: catalog:register input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + repoContentsUrl: ${{ steps["publish"].output.repoContentsUrl }} catalogInfoPath: '/catalog-info.yaml' # Outputs are displayed to the user after a successful execution of the template. output: links: - title: Repository - url: ${{ steps.publish.output.remoteUrl }} + url: ${{ steps["publish"].output.remoteUrl }} - title: Open in catalog icon: catalog - entityRef: ${{ steps.register.output.entityRef }} + entityRef: ${{ steps["register"].output.entityRef }} diff --git a/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml b/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml index 52714f6d73..8fd60b594a 100644 --- a/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml +++ b/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml @@ -68,13 +68,13 @@ spec: name: Register action: catalog:register input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + repoContentsUrl: ${{ steps["publish"].output.repoContentsUrl }} catalogInfoPath: '/catalog-info.yaml' output: links: - title: Repository - url: ${{ steps.publish.output.remoteUrl }} + url: ${{ steps["publish"].output.remoteUrl }} - title: Open in catalog icon: catalog - entityRef: ${{ steps.register.output.entityRef }} + entityRef: ${{ steps["register"].output.entityRef }}