-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve scaffolder docs #1444
Improve scaffolder docs #1444
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,28 +121,28 @@ nav: | |
- Publishing Plugins: '/docs/custom-plugins/legacy/artifactory/' | ||
- Scaffolder: | ||
- Overview: '/docs/scaffolder/writing-templates/' | ||
- Scaffolder Actions: | ||
- Actions Directory: '/docs/scaffolder/scaffolder-actions-directory/' | ||
- Custom Scaffolder Actions: '/docs/scaffolder/self-hosted-scaffolder-actions/' | ||
- Scaffolder Parameters: | ||
- Paremeters Guide: '/docs/scaffolder/scaffolder-parameters' | ||
- Custom Scaffolder Parameters: '/docs/scaffolder/custom-fields/' | ||
- Actions Directory: '/docs/scaffolder/scaffolder-actions-directory/' | ||
- Custom Actions: '/docs/scaffolder/self-hosted-scaffolder-actions/' | ||
- Parameters: '/docs/scaffolder/scaffolder-parameters/' | ||
- Custom Parameters: '/docs/scaffolder/custom-fields/' | ||
- Organising Templates: '/docs/scaffolder/certified-templates/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was missing from nav |
||
- Recipes: | ||
- Create RFC: '/docs/scaffolder/create-rfc/' | ||
- Debug template: '/docs/scaffolder/debug-template/' | ||
- Append file: '/docs/scaffolder/append/' | ||
- Re-use parameters: '/docs/scaffolder/global-constants/' | ||
- Edit files: '/docs/scaffolder/edit-file/' | ||
- Pre-filling templates via URL params: '/docs/scaffolder/predefined-values-via-url-params/' | ||
- Manipulate JSON files: '/docs/scaffolder/manipulate-json-files' | ||
- Manipulate YAML files: '/docs/scaffolder/manipulate-yaml-files' | ||
- Call external API: '/docs/scaffolder/call-external-api' | ||
- Transform JSON files with JSONata: '/docs/scaffolder/json-jsonata-transform' | ||
- Transform YAML files with JSONata: '/docs/scaffolder/yaml-jsonata-transform' | ||
- Using for loops in templates: '/docs/scaffolder/loops-in-templates' | ||
- Using for loops to repeat scaffolder steps: '/docs/scaffolder/loops-in-steps' | ||
- Assigning variables to the scaffolder context: '/docs/scaffolder/variables-in-scaffolder' | ||
- Creating a PR to an Azure DevOps repository: '/docs/scaffolder/azure-actions' | ||
- Create RFC: '/docs/scaffolder/recipes/create-rfc/' | ||
- Debug template: '/docs/scaffolder/recipes/debug-template/' | ||
- Append file: '/docs/scaffolder/recipes/append/' | ||
- Re-use parameters: '/docs/scaffolder/recipes/global-constants/' | ||
- Re-use steps: '/docs/scaffolder/recipes/placeholders/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this |
||
- Edit files: '/docs/scaffolder/recipes/edit-file/' | ||
- Pre-filling templates via URL params: '/docs/scaffolder/recipes/predefined-values-via-url-params/' | ||
- Manipulate JSON files: '/docs/scaffolder/recipes/manipulate-json-files' | ||
- Manipulate YAML files: '/docs/scaffolder/recipes/manipulate-yaml-files' | ||
- Call external API: '/docs/scaffolder/recipes/call-external-api' | ||
- Transform JSON files with JSONata: '/docs/scaffolder/recipes/json-jsonata-transform' | ||
- Transform YAML files with JSONata: '/docs/scaffolder/recipes/yaml-jsonata-transform' | ||
- Using for loops in templates: '/docs/scaffolder/recipes/loops-in-templates' | ||
- Using for loops to repeat scaffolder steps: '/docs/scaffolder/recipes/loops-in-steps' | ||
- Assigning variables to the scaffolder context: '/docs/scaffolder/recipes/variables-in-scaffolder' | ||
- Creating a PR to an Azure DevOps repository: '/docs/scaffolder/recipes/azure-actions' | ||
- Tech-Insights: | ||
- Introduction: '/docs/tech-insights/introduction/' | ||
- Data Sources: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
--- | ||
title: Certified Templates | ||
title: Organising Templates | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repurposing this for a more general page |
||
publishedDate: '2023-08-07' | ||
description: Tutorial to render the certified chip on your scaffolder templates | ||
description: How to organise and categorize Templates | ||
--- | ||
|
||
## Overview | ||
|
||
Certified templates are templates that got an approval from the owner of the template. They get a certification chip rendered on their template card when you visit the `/create` page. | ||
When you start getting lots of templates and they start getting used a lot and relied on, organising and categorising them becomes a priority. | ||
|
||
### Grouping templates | ||
|
||
Roadie Admin users can create groups or categories of templates that will show in the list page. This can be done via | ||
|
||
|
||
### Certified Templates | ||
|
||
![certified-template](./certified.webp) | ||
|
||
Certified templates are templates that have an approval from the owner of the template. They get a certification chip rendered on their template card when you visit the `/create` page. | ||
|
||
You should only certify templates that are in a mature and stable state. This allows users to safely run a certified template without worrying that it is not working or is incomplete. | ||
|
||
The certification chip can be shown on your templates by adding the `roadie.io/certified: "true"` annotation to the template. | ||
|
||
|
@@ -21,8 +34,3 @@ spec: | |
... | ||
``` | ||
|
||
![certified-template](./certified.webp) | ||
|
||
## Usage | ||
|
||
The best practice is to certify your templates that are in a mature state and you are not working on them actively. This way your engineers can safely run all of the certified templates without worrying which template is the one that they should run. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: Refer to steps defined in another repo | ||
publishedDate: '2024-12-03' | ||
description: If you want to have a centrally defined, re-useable step you can use the following pattern | ||
--- | ||
|
||
## Template | ||
|
||
## Actions used | ||
|
||
- [`placeholders`](https://backstage.io/docs/features/software-catalog/descriptor-format#substitutions-in-the-descriptor-format) | ||
- [`debug:log`](https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) | ||
|
||
You can check the available actions in Roadie if you visit `/create/actions`. | ||
|
||
### Relative path | ||
|
||
```yaml | ||
--- | ||
apiVersion: scaffolder.backstage.io/v1beta3 | ||
kind: Template | ||
metadata: | ||
name: re-useable-step-example | ||
title: Example of sourcing a step from a constant | ||
spec: | ||
owner: roadie | ||
type: service | ||
|
||
steps: | ||
- $yaml: './constants/log.yaml' | ||
``` | ||
|
||
|
||
./constants/log.yaml | ||
```yaml | ||
id: log-message | ||
action: debug:log | ||
input: | ||
message: 'Hello there' | ||
``` | ||
|
||
### External file | ||
|
||
```yaml | ||
--- | ||
apiVersion: scaffolder.backstage.io/v1beta3 | ||
kind: Template | ||
metadata: | ||
name: re-useable-step-example | ||
title: Example of sourcing a step from a constant | ||
spec: | ||
owner: roadie | ||
type: service | ||
|
||
steps: | ||
- $yaml: 'https://github.com/RoadieHQ/software-templates/tree/main/scaffolder-templates/steps/log.yaml' | ||
``` | ||
|
||
|
||
https://github.com/RoadieHQ/software-templates/tree/main/scaffolder-templates/steps/log.yaml | ||
```yaml | ||
id: log-message | ||
action: debug:log | ||
input: | ||
message: 'Hello there' | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ | |
"react-tabs": "^4.2.1", | ||
"react-use": "^17.2.4", | ||
"remark-html": "^13.0.2", | ||
"sharp": "^0.33.5", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seemed to be needed when I build it locally |
||
"swagger-ui": "^5.9.1", | ||
"swagger-ui-dist": "^5.9.1", | ||
"tailwindcss": "^3.0.7" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flattening these as they are not deep enough to warrent being hidden behind additional click