Merge pull request #15072 from RoadieHQ/document-square-bracket-syntax-in-docs

use nunjucks "square bracket syntax" for steps in docs
This commit is contained in:
Ben Lambert
2022-12-09 10:26:34 +01:00
committed by GitHub
10 changed files with 35 additions and 26 deletions
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch
'@backstage/plugin-scaffolder-backend-module-rails': patch
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
'@backstage/create-app': patch
'@backstage/plugin-scaffolder-backend': patch
---
Change step output template examples to use square bracket syntax.
@@ -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'
```
@@ -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'
```
@@ -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 }}
```
@@ -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
@@ -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 }}
@@ -129,7 +129,7 @@ spec:
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
- name: Results
@@ -141,10 +141,10 @@ spec:
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 }}
```
You can also visit the `/create/actions` route in your Backstage application to find out more about the parameters this action accepts when it's installed to configure how you like.
@@ -206,7 +206,7 @@ spec:
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
- name: Results
@@ -218,10 +218,10 @@ spec:
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 }}
```
### What you need to run that action
@@ -126,7 +126,7 @@ spec:
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
- name: Results
@@ -138,10 +138,10 @@ spec:
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 }}
```
You can also visit the `/create/actions` route in your Backstage application to find out more about the parameters this action accepts when it's installed to configure how you like.
@@ -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 }}