From 47d5b201d4b7a7cadd0b8c6d0ffb7235773e2828 Mon Sep 17 00:00:00 2001 From: sblausten Date: Tue, 3 Dec 2024 11:50:52 +0100 Subject: [PATCH 1/5] Wip --- .../catalog/showing-dependencies/index.md | 1 + content/docs/docs-nav.yaml | 33 ++-- .../scaffolder/certified-templates/index.md | 24 ++- .../scaffolder/{ => recipes}/append/index.md | 0 .../{ => recipes}/azure-actions/index.md | 0 .../{ => recipes}/call-external-api/index.md | 0 .../{ => recipes}/create-rfc/index.md | 0 .../{ => recipes}/debug-template/index.md | 0 .../{ => recipes}/edit-file/index.md | 0 .../{ => recipes}/global-constants/index.md | 0 .../json-jsonata-transform/index.md | 0 .../{ => recipes}/loops-in-steps/index.md | 0 .../{ => recipes}/loops-in-templates/index.md | 0 .../manipulate-json-files/index.md | 0 .../manipulate-yaml-files/index.md | 0 .../predefined-values-via-url-params/index.md | 0 .../variables-in-scaffolder/index.md | 0 .../yaml-jsonata-transform/index.md | 0 .../docs/scaffolder/troubleshooting/index.md | 8 +- package.json | 1 + yarn.lock | 156 +++++++++++++++++- 21 files changed, 194 insertions(+), 29 deletions(-) rename content/docs/scaffolder/{ => recipes}/append/index.md (100%) rename content/docs/scaffolder/{ => recipes}/azure-actions/index.md (100%) rename content/docs/scaffolder/{ => recipes}/call-external-api/index.md (100%) rename content/docs/scaffolder/{ => recipes}/create-rfc/index.md (100%) rename content/docs/scaffolder/{ => recipes}/debug-template/index.md (100%) rename content/docs/scaffolder/{ => recipes}/edit-file/index.md (100%) rename content/docs/scaffolder/{ => recipes}/global-constants/index.md (100%) rename content/docs/scaffolder/{ => recipes}/json-jsonata-transform/index.md (100%) rename content/docs/scaffolder/{ => recipes}/loops-in-steps/index.md (100%) rename content/docs/scaffolder/{ => recipes}/loops-in-templates/index.md (100%) rename content/docs/scaffolder/{ => recipes}/manipulate-json-files/index.md (100%) rename content/docs/scaffolder/{ => recipes}/manipulate-yaml-files/index.md (100%) rename content/docs/scaffolder/{ => recipes}/predefined-values-via-url-params/index.md (100%) rename content/docs/scaffolder/{ => recipes}/variables-in-scaffolder/index.md (100%) rename content/docs/scaffolder/{ => recipes}/yaml-jsonata-transform/index.md (100%) diff --git a/content/docs/catalog/showing-dependencies/index.md b/content/docs/catalog/showing-dependencies/index.md index 4b547ff28..04e320dc9 100644 --- a/content/docs/catalog/showing-dependencies/index.md +++ b/content/docs/catalog/showing-dependencies/index.md @@ -47,6 +47,7 @@ You only need to define one side of a relationship for it to appear on both side | spec.managedBy | - | string array | Any | User,Group,Product | | spec.manages | - | string array | Any | User | +'dependsOn', 'dependencyOf', 'providesApis', 'apiProvidedBy', 'consumesApis' These relationship names can be used as you see fit to describe your organisation. Backstage provides some [suggestions on usage](https://backstage.io/docs/features/software-catalog/well-known-relations/) but this is in fact arbitrary and only limited by the Applicable Kinds in the above table. diff --git a/content/docs/docs-nav.yaml b/content/docs/docs-nav.yaml index b959aa947..04b787de5 100644 --- a/content/docs/docs-nav.yaml +++ b/content/docs/docs-nav.yaml @@ -125,24 +125,25 @@ nav: - Actions Directory: '/docs/scaffolder/scaffolder-actions-directory/' - Custom Scaffolder Actions: '/docs/scaffolder/self-hosted-scaffolder-actions/' - Scaffolder Parameters: - - Paremeters Guide: '/docs/scaffolder/scaffolder-parameters' + - Paremeters Guide: '/docs/scaffolder/scaffolder-parameters/' - Custom Scaffolder Parameters: '/docs/scaffolder/custom-fields/' + - Organising Templates: '/docs/scaffolder/certified-templates/' - 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/' + - 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: diff --git a/content/docs/scaffolder/certified-templates/index.md b/content/docs/scaffolder/certified-templates/index.md index 884e0bbfb..960da51e9 100644 --- a/content/docs/scaffolder/certified-templates/index.md +++ b/content/docs/scaffolder/certified-templates/index.md @@ -1,12 +1,25 @@ --- -title: Certified Templates +title: Organising Templates 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. diff --git a/content/docs/scaffolder/append/index.md b/content/docs/scaffolder/recipes/append/index.md similarity index 100% rename from content/docs/scaffolder/append/index.md rename to content/docs/scaffolder/recipes/append/index.md diff --git a/content/docs/scaffolder/azure-actions/index.md b/content/docs/scaffolder/recipes/azure-actions/index.md similarity index 100% rename from content/docs/scaffolder/azure-actions/index.md rename to content/docs/scaffolder/recipes/azure-actions/index.md diff --git a/content/docs/scaffolder/call-external-api/index.md b/content/docs/scaffolder/recipes/call-external-api/index.md similarity index 100% rename from content/docs/scaffolder/call-external-api/index.md rename to content/docs/scaffolder/recipes/call-external-api/index.md diff --git a/content/docs/scaffolder/create-rfc/index.md b/content/docs/scaffolder/recipes/create-rfc/index.md similarity index 100% rename from content/docs/scaffolder/create-rfc/index.md rename to content/docs/scaffolder/recipes/create-rfc/index.md diff --git a/content/docs/scaffolder/debug-template/index.md b/content/docs/scaffolder/recipes/debug-template/index.md similarity index 100% rename from content/docs/scaffolder/debug-template/index.md rename to content/docs/scaffolder/recipes/debug-template/index.md diff --git a/content/docs/scaffolder/edit-file/index.md b/content/docs/scaffolder/recipes/edit-file/index.md similarity index 100% rename from content/docs/scaffolder/edit-file/index.md rename to content/docs/scaffolder/recipes/edit-file/index.md diff --git a/content/docs/scaffolder/global-constants/index.md b/content/docs/scaffolder/recipes/global-constants/index.md similarity index 100% rename from content/docs/scaffolder/global-constants/index.md rename to content/docs/scaffolder/recipes/global-constants/index.md diff --git a/content/docs/scaffolder/json-jsonata-transform/index.md b/content/docs/scaffolder/recipes/json-jsonata-transform/index.md similarity index 100% rename from content/docs/scaffolder/json-jsonata-transform/index.md rename to content/docs/scaffolder/recipes/json-jsonata-transform/index.md diff --git a/content/docs/scaffolder/loops-in-steps/index.md b/content/docs/scaffolder/recipes/loops-in-steps/index.md similarity index 100% rename from content/docs/scaffolder/loops-in-steps/index.md rename to content/docs/scaffolder/recipes/loops-in-steps/index.md diff --git a/content/docs/scaffolder/loops-in-templates/index.md b/content/docs/scaffolder/recipes/loops-in-templates/index.md similarity index 100% rename from content/docs/scaffolder/loops-in-templates/index.md rename to content/docs/scaffolder/recipes/loops-in-templates/index.md diff --git a/content/docs/scaffolder/manipulate-json-files/index.md b/content/docs/scaffolder/recipes/manipulate-json-files/index.md similarity index 100% rename from content/docs/scaffolder/manipulate-json-files/index.md rename to content/docs/scaffolder/recipes/manipulate-json-files/index.md diff --git a/content/docs/scaffolder/manipulate-yaml-files/index.md b/content/docs/scaffolder/recipes/manipulate-yaml-files/index.md similarity index 100% rename from content/docs/scaffolder/manipulate-yaml-files/index.md rename to content/docs/scaffolder/recipes/manipulate-yaml-files/index.md diff --git a/content/docs/scaffolder/predefined-values-via-url-params/index.md b/content/docs/scaffolder/recipes/predefined-values-via-url-params/index.md similarity index 100% rename from content/docs/scaffolder/predefined-values-via-url-params/index.md rename to content/docs/scaffolder/recipes/predefined-values-via-url-params/index.md diff --git a/content/docs/scaffolder/variables-in-scaffolder/index.md b/content/docs/scaffolder/recipes/variables-in-scaffolder/index.md similarity index 100% rename from content/docs/scaffolder/variables-in-scaffolder/index.md rename to content/docs/scaffolder/recipes/variables-in-scaffolder/index.md diff --git a/content/docs/scaffolder/yaml-jsonata-transform/index.md b/content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md similarity index 100% rename from content/docs/scaffolder/yaml-jsonata-transform/index.md rename to content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md diff --git a/content/docs/scaffolder/troubleshooting/index.md b/content/docs/scaffolder/troubleshooting/index.md index adb16efb3..a13cf24b0 100644 --- a/content/docs/scaffolder/troubleshooting/index.md +++ b/content/docs/scaffolder/troubleshooting/index.md @@ -9,11 +9,11 @@ Scaffolder templates are a powerful tool to create software, configurations and ## Testing -Testing of templates is not well supported in Backstage currently, mostly due to the fact that many scaffolder actions perform side-effects. +Testing of templates is not well supported in Backstage currently, mostly due to the fact that many Scaffolder actions perform side-effects. A limited set of functionality exists to preview and edit parameters in a sandbox, and dry-run templates (skipping steps that perform mutations). -You can find these features at `/import/entity-preview`. +You can find these features at `/create/tools`. It is also possible to test templates by changing the name and namespace of the template to indicate that it is a preview or test version, then adding it to the catalog via `/import/entity` using the version on a published feature branch. This preview template will show up in the list of templates however so it is important to remove the entity after testing to avoid duplication, and also to make sure the title/description indicates that it is a temporary test. @@ -23,13 +23,13 @@ This preview template will show up in the list of templates however so it is imp Writing templates can be a little cumbersome at times. We have compiled a list of errors that we have seen in the past, that might help you determine the cause of your issue. -Template YAML input forms can also be tested at `/templates/edit` using a live template preview viewer which speeds up the testing cycle. +Template YAML input forms can also be tested at `/create/tools` using a live template preview viewer which speeds up the testing cycle. ![preview-template](./template-preview-tool.webp) ### Resource not accessible by integration -This error is referring to actions that interact GitHub. It means that the Roadie GitHub app is unable to read, create or update the resource/s that are being touched by the Scaffolder step. +This error is referring to actions that interact with GitHub. It means that the Roadie GitHub app is unable to read, create or update the resource/s that are being touched by the Scaffolder step. There can be multiple different reasons for this generic error message that GitHub responds with. Unfortunately the errors returned from GitHub don't provide a lot more information about the specific resources that are being access but below are some cases where it is common to encounter this message. #### Attempting to create/amend a repository and add collaborators/owners diff --git a/package.json b/package.json index 0e06768fc..73d6a27cc 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "react-tabs": "^4.2.1", "react-use": "^17.2.4", "remark-html": "^13.0.2", + "sharp": "^0.33.5", "swagger-ui": "^5.9.1", "swagger-ui-dist": "^5.9.1", "tailwindcss": "^3.0.7" diff --git a/yarn.lock b/yarn.lock index a5c7e1e65..204d1b32a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1618,6 +1618,13 @@ debug "^3.1.0" lodash.once "^4.1.1" +"@emnapi/runtime@^1.2.0": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.3.1.tgz#0fcaa575afc31f455fd33534c19381cfce6c6f60" + integrity sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw== + dependencies: + tslib "^2.4.0" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -1935,6 +1942,119 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@img/sharp-darwin-arm64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz#ef5b5a07862805f1e8145a377c8ba6e98813ca08" + integrity sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ== + optionalDependencies: + "@img/sharp-libvips-darwin-arm64" "1.0.4" + +"@img/sharp-darwin-x64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz#e03d3451cd9e664faa72948cc70a403ea4063d61" + integrity sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q== + optionalDependencies: + "@img/sharp-libvips-darwin-x64" "1.0.4" + +"@img/sharp-libvips-darwin-arm64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz#447c5026700c01a993c7804eb8af5f6e9868c07f" + integrity sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg== + +"@img/sharp-libvips-darwin-x64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz#e0456f8f7c623f9dbfbdc77383caa72281d86062" + integrity sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ== + +"@img/sharp-libvips-linux-arm64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz#979b1c66c9a91f7ff2893556ef267f90ebe51704" + integrity sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA== + +"@img/sharp-libvips-linux-arm@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz#99f922d4e15216ec205dcb6891b721bfd2884197" + integrity sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g== + +"@img/sharp-libvips-linux-s390x@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz#f8a5eb1f374a082f72b3f45e2fb25b8118a8a5ce" + integrity sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA== + +"@img/sharp-libvips-linux-x64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz#d4c4619cdd157774906e15770ee119931c7ef5e0" + integrity sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw== + +"@img/sharp-libvips-linuxmusl-arm64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz#166778da0f48dd2bded1fa3033cee6b588f0d5d5" + integrity sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA== + +"@img/sharp-libvips-linuxmusl-x64@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz#93794e4d7720b077fcad3e02982f2f1c246751ff" + integrity sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw== + +"@img/sharp-linux-arm64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz#edb0697e7a8279c9fc829a60fc35644c4839bb22" + integrity sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA== + optionalDependencies: + "@img/sharp-libvips-linux-arm64" "1.0.4" + +"@img/sharp-linux-arm@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz#422c1a352e7b5832842577dc51602bcd5b6f5eff" + integrity sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ== + optionalDependencies: + "@img/sharp-libvips-linux-arm" "1.0.5" + +"@img/sharp-linux-s390x@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz#f5c077926b48e97e4a04d004dfaf175972059667" + integrity sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q== + optionalDependencies: + "@img/sharp-libvips-linux-s390x" "1.0.4" + +"@img/sharp-linux-x64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz#d806e0afd71ae6775cc87f0da8f2d03a7c2209cb" + integrity sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA== + optionalDependencies: + "@img/sharp-libvips-linux-x64" "1.0.4" + +"@img/sharp-linuxmusl-arm64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz#252975b915894fb315af5deea174651e208d3d6b" + integrity sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-arm64" "1.0.4" + +"@img/sharp-linuxmusl-x64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz#3f4609ac5d8ef8ec7dadee80b560961a60fd4f48" + integrity sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-x64" "1.0.4" + +"@img/sharp-wasm32@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz#6f44f3283069d935bb5ca5813153572f3e6f61a1" + integrity sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg== + dependencies: + "@emnapi/runtime" "^1.2.0" + +"@img/sharp-win32-ia32@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz#1a0c839a40c5351e9885628c85f2e5dfd02b52a9" + integrity sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ== + +"@img/sharp-win32-x64@0.33.5": + version "0.33.5" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz#56f00962ff0c4e0eb93d34a047d29fa995e3e342" + integrity sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -6355,6 +6475,11 @@ detect-libc@^2.0.0, detect-libc@^2.0.1: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== +detect-libc@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -14230,7 +14355,7 @@ semver@^7.5.3: dependencies: lru-cache "^6.0.0" -semver@^7.5.4: +semver@^7.5.4, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -14348,6 +14473,35 @@ sharp@^0.30.7: tar-fs "^2.1.1" tunnel-agent "^0.6.0" +sharp@^0.33.5: + version "0.33.5" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.33.5.tgz#13e0e4130cc309d6a9497596715240b2ec0c594e" + integrity sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw== + dependencies: + color "^4.2.3" + detect-libc "^2.0.3" + semver "^7.6.3" + optionalDependencies: + "@img/sharp-darwin-arm64" "0.33.5" + "@img/sharp-darwin-x64" "0.33.5" + "@img/sharp-libvips-darwin-arm64" "1.0.4" + "@img/sharp-libvips-darwin-x64" "1.0.4" + "@img/sharp-libvips-linux-arm" "1.0.5" + "@img/sharp-libvips-linux-arm64" "1.0.4" + "@img/sharp-libvips-linux-s390x" "1.0.4" + "@img/sharp-libvips-linux-x64" "1.0.4" + "@img/sharp-libvips-linuxmusl-arm64" "1.0.4" + "@img/sharp-libvips-linuxmusl-x64" "1.0.4" + "@img/sharp-linux-arm" "0.33.5" + "@img/sharp-linux-arm64" "0.33.5" + "@img/sharp-linux-s390x" "0.33.5" + "@img/sharp-linux-x64" "0.33.5" + "@img/sharp-linuxmusl-arm64" "0.33.5" + "@img/sharp-linuxmusl-x64" "0.33.5" + "@img/sharp-wasm32" "0.33.5" + "@img/sharp-win32-ia32" "0.33.5" + "@img/sharp-win32-x64" "0.33.5" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" From acb3ef73f133caf45dd003ea72cd70a19721e772 Mon Sep 17 00:00:00 2001 From: sblausten Date: Tue, 3 Dec 2024 11:55:36 +0100 Subject: [PATCH 2/5] remove line --- content/docs/catalog/showing-dependencies/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/catalog/showing-dependencies/index.md b/content/docs/catalog/showing-dependencies/index.md index 04e320dc9..4b547ff28 100644 --- a/content/docs/catalog/showing-dependencies/index.md +++ b/content/docs/catalog/showing-dependencies/index.md @@ -47,7 +47,6 @@ You only need to define one side of a relationship for it to appear on both side | spec.managedBy | - | string array | Any | User,Group,Product | | spec.manages | - | string array | Any | User | -'dependsOn', 'dependencyOf', 'providesApis', 'apiProvidedBy', 'consumesApis' These relationship names can be used as you see fit to describe your organisation. Backstage provides some [suggestions on usage](https://backstage.io/docs/features/software-catalog/well-known-relations/) but this is in fact arbitrary and only limited by the Applicable Kinds in the above table. From c57e3d8aca8e81db3eb2627e778bd49bebfe88a0 Mon Sep 17 00:00:00 2001 From: sblausten Date: Tue, 3 Dec 2024 11:56:18 +0100 Subject: [PATCH 3/5] Spelling --- content/docs/docs-nav.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/docs-nav.yaml b/content/docs/docs-nav.yaml index 04b787de5..1a86a9ad5 100644 --- a/content/docs/docs-nav.yaml +++ b/content/docs/docs-nav.yaml @@ -125,7 +125,7 @@ nav: - Actions Directory: '/docs/scaffolder/scaffolder-actions-directory/' - Custom Scaffolder Actions: '/docs/scaffolder/self-hosted-scaffolder-actions/' - Scaffolder Parameters: - - Paremeters Guide: '/docs/scaffolder/scaffolder-parameters/' + - Parameters Guide: '/docs/scaffolder/scaffolder-parameters/' - Custom Scaffolder Parameters: '/docs/scaffolder/custom-fields/' - Organising Templates: '/docs/scaffolder/certified-templates/' - Recipes: From 256861076122fa01be4513088aacdf8c706e8994 Mon Sep 17 00:00:00 2001 From: sblausten Date: Tue, 3 Dec 2024 12:06:25 +0100 Subject: [PATCH 4/5] Add more placeholder examples --- content/docs/docs-nav.yaml | 11 ++-- .../docs/scaffolder/recipes/append/index.md | 2 +- .../scaffolder/recipes/azure-actions/index.md | 2 +- .../recipes/call-external-api/index.md | 2 +- .../scaffolder/recipes/create-rfc/index.md | 2 +- .../recipes/debug-template/index.md | 2 +- .../scaffolder/recipes/edit-file/index.md | 6 +- .../recipes/global-constants/index.md | 38 ++++++++++- .../recipes/json-jsonata-transform/index.md | 2 +- .../recipes/loops-in-steps/index.md | 2 +- .../recipes/loops-in-templates/index.md | 2 +- .../recipes/manipulate-json-files/index.md | 2 +- .../recipes/manipulate-yaml-files/index.md | 2 +- .../scaffolder/recipes/placeholders/index.md | 66 +++++++++++++++++++ .../recipes/variables-in-scaffolder/index.md | 2 +- .../recipes/yaml-jsonata-transform/index.md | 2 +- .../scaffolder-actions-directory/index.md | 2 +- 17 files changed, 124 insertions(+), 23 deletions(-) create mode 100644 content/docs/scaffolder/recipes/placeholders/index.md diff --git a/content/docs/docs-nav.yaml b/content/docs/docs-nav.yaml index 1a86a9ad5..e483bb861 100644 --- a/content/docs/docs-nav.yaml +++ b/content/docs/docs-nav.yaml @@ -121,18 +121,17 @@ 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: - - Parameters 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/' - Recipes: - 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/' - 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' diff --git a/content/docs/scaffolder/recipes/append/index.md b/content/docs/scaffolder/recipes/append/index.md index abfd991e9..0783b5942 100644 --- a/content/docs/scaffolder/recipes/append/index.md +++ b/content/docs/scaffolder/recipes/append/index.md @@ -13,7 +13,7 @@ description: How to append some user defined content to a file and create a new - [`publish:github:pull-request`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts) - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ```yaml diff --git a/content/docs/scaffolder/recipes/azure-actions/index.md b/content/docs/scaffolder/recipes/azure-actions/index.md index c74ce630a..80882e671 100644 --- a/content/docs/scaffolder/recipes/azure-actions/index.md +++ b/content/docs/scaffolder/recipes/azure-actions/index.md @@ -11,7 +11,7 @@ description: Clone a repo in Azure DevOps make changes, push and create a PR. - [`azure:repo:push`](https://github.com/Parfuemerie-Douglas/scaffolder-backend-module-azure-repositories) - [`azure:repo:pr`](https://github.com/Parfuemerie-Douglas/scaffolder-backend-module-azure-repositories) -For more information on these actions and others visit `/templates/actions` in your Roadie application. +For more information on these actions and others visit `/create/actions` in your Roadie application. ## Template diff --git a/content/docs/scaffolder/recipes/call-external-api/index.md b/content/docs/scaffolder/recipes/call-external-api/index.md index 16b29577c..90dcc97a2 100644 --- a/content/docs/scaffolder/recipes/call-external-api/index.md +++ b/content/docs/scaffolder/recipes/call-external-api/index.md @@ -14,7 +14,7 @@ description: An introduction template calling an external API - `debug:log` - `https:backstage:request` -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/create-rfc/index.md b/content/docs/scaffolder/recipes/create-rfc/index.md index 865764451..972787627 100644 --- a/content/docs/scaffolder/recipes/create-rfc/index.md +++ b/content/docs/scaffolder/recipes/create-rfc/index.md @@ -13,7 +13,7 @@ description: An introduction template to creating an RFC - [`fs:rename`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/filesystem/rename.ts) - [`publish:github:pull-request`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/debug-template/index.md b/content/docs/scaffolder/recipes/debug-template/index.md index 6f7d85659..31a132294 100644 --- a/content/docs/scaffolder/recipes/debug-template/index.md +++ b/content/docs/scaffolder/recipes/debug-template/index.md @@ -16,7 +16,7 @@ description: Template to fetch and render the content of your skeleton template - `fs:read` - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/edit-file/index.md b/content/docs/scaffolder/recipes/edit-file/index.md index cf45ec2da..78d1a5e2a 100644 --- a/content/docs/scaffolder/recipes/edit-file/index.md +++ b/content/docs/scaffolder/recipes/edit-file/index.md @@ -20,7 +20,7 @@ Proper editing functionality is not well supported by Backstage at the moment th - [`publish:github:pull-request`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts) - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ### Example Template @@ -114,7 +114,7 @@ spec: - [`publish:github:pull-request`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts) - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ### Example Template @@ -198,7 +198,7 @@ spec: - [`publish:github:pull-request`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts) - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ### Example Template diff --git a/content/docs/scaffolder/recipes/global-constants/index.md b/content/docs/scaffolder/recipes/global-constants/index.md index 18a9045a4..0b82b5216 100644 --- a/content/docs/scaffolder/recipes/global-constants/index.md +++ b/content/docs/scaffolder/recipes/global-constants/index.md @@ -11,8 +11,9 @@ description: If you want to have a centrally defined re-useable parameter value - [`placeholders`](https://backstage.io/docs/features/software-catalog/descriptor-format#substitutions-in-the-descriptor-format) - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. +### Relative file ```yaml --- @@ -40,6 +41,41 @@ spec: ./constants/products.yaml ```yaml title: Select Product +properties: + product: + title: Product + type: string + enum: ["Search", "CRM", "Onboarding"] +``` + +### External File + +```yaml +--- +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +metadata: + name: global-param-example + title: Example of sourcing params from a constant +spec: + owner: roadie + type: service + + parameters: + - $yaml: https://github.com/RoadieHQ/software-templates/tree/main/scaffolder-templates/parameters/products.yaml + + steps: + - id: log-message + name: List selected product + action: debug:log + input: + message: 'Selected product: ${{ parameters.product }}' +``` + + +https://github.com/RoadieHQ/software-templates/tree/main/scaffolder-templates/parameters/products.yaml +```yaml +title: Select Product properties: product: title: Product diff --git a/content/docs/scaffolder/recipes/json-jsonata-transform/index.md b/content/docs/scaffolder/recipes/json-jsonata-transform/index.md index fda1b3b3d..c1b3d05f7 100644 --- a/content/docs/scaffolder/recipes/json-jsonata-transform/index.md +++ b/content/docs/scaffolder/recipes/json-jsonata-transform/index.md @@ -10,7 +10,7 @@ description: An introduction template utilizing the roadiehq:utils:jsonata:json: - `roadiehq:utils:fs:write` - `roadiehq:utils:jsonata:json:transform` -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/loops-in-steps/index.md b/content/docs/scaffolder/recipes/loops-in-steps/index.md index a4bf65f25..16ac1d8e8 100644 --- a/content/docs/scaffolder/recipes/loops-in-steps/index.md +++ b/content/docs/scaffolder/recipes/loops-in-steps/index.md @@ -10,7 +10,7 @@ description: An example template that uses the Scaffolder step `each` key word t - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/loops-in-templates/index.md b/content/docs/scaffolder/recipes/loops-in-templates/index.md index d96badc66..16862e105 100644 --- a/content/docs/scaffolder/recipes/loops-in-templates/index.md +++ b/content/docs/scaffolder/recipes/loops-in-templates/index.md @@ -12,7 +12,7 @@ description: An example template that uses Nunjucks builtin looping functionalit - [`fetch:template`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts) - [`roadiehq:utils:fs:parse`](https://github.com/RoadieHQ/roadie-backstage-plugins/blob/main/plugins/scaffolder-actions/scaffolder-backend-module-utils/src/actions/fs/parseFile.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/manipulate-json-files/index.md b/content/docs/scaffolder/recipes/manipulate-json-files/index.md index 29f28f783..4774839f6 100644 --- a/content/docs/scaffolder/recipes/manipulate-json-files/index.md +++ b/content/docs/scaffolder/recipes/manipulate-json-files/index.md @@ -12,7 +12,7 @@ description: An introduction template utilizing the JSON editing actions - `roadiehq:utils:fs:parse` - `roadiehq:utils:serialize:json` -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/manipulate-yaml-files/index.md b/content/docs/scaffolder/recipes/manipulate-yaml-files/index.md index 03027fc54..5828e8e47 100644 --- a/content/docs/scaffolder/recipes/manipulate-yaml-files/index.md +++ b/content/docs/scaffolder/recipes/manipulate-yaml-files/index.md @@ -12,7 +12,7 @@ description: An introduction template utilizing the YAML editing actions - `roadiehq:utils:fs:parse` - `roadiehq:utils:serialize:yaml` -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/placeholders/index.md b/content/docs/scaffolder/recipes/placeholders/index.md new file mode 100644 index 000000000..49acb23e8 --- /dev/null +++ b/content/docs/scaffolder/recipes/placeholders/index.md @@ -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' +``` diff --git a/content/docs/scaffolder/recipes/variables-in-scaffolder/index.md b/content/docs/scaffolder/recipes/variables-in-scaffolder/index.md index e27a11cb5..813d80775 100644 --- a/content/docs/scaffolder/recipes/variables-in-scaffolder/index.md +++ b/content/docs/scaffolder/recipes/variables-in-scaffolder/index.md @@ -11,7 +11,7 @@ description: An example template displaying how to use JSONata to assign variabl - [`debug:log`](https://github.com/backstage/backstage/blob/54b9f073d13d878fce652c9ec8b8cdfc5fd85c6a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.ts) - [`roadiehq:utils:jsonata`](https://github.com/RoadieHQ/roadie-backstage-plugins/blob/main/plugins/scaffolder-actions/scaffolder-backend-module-utils/src/actions/jsonata/jsonata.ts) -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md b/content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md index 7c1b6b3a9..e70af38ea 100644 --- a/content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md +++ b/content/docs/scaffolder/recipes/yaml-jsonata-transform/index.md @@ -10,7 +10,7 @@ description: An introduction template utilizing the roadiehq:utils:jsonata:yaml: - `roadiehq:utils:fs:write` - `roadiehq:utils:jsonata:yaml:transform` -You can check the available actions if you visit `/templates/actions`. +You can check the available actions if you visit `/create/actions`. ## Walkthrough diff --git a/content/docs/scaffolder/scaffolder-actions-directory/index.md b/content/docs/scaffolder/scaffolder-actions-directory/index.md index 3a566fad9..b20cd151f 100644 --- a/content/docs/scaffolder/scaffolder-actions-directory/index.md +++ b/content/docs/scaffolder/scaffolder-actions-directory/index.md @@ -11,7 +11,7 @@ Roadie comes bundled with a select set of actions to use out of the box. If you If you want to add an action to this list, please [raise an issue on our repo](https://github.com/RoadieHQ/marketing-site/issues) or contribute a PR with the addition. **NB:** -- A subset of available actions in Roadie can also be **found at the following page inside your Roadie app**: `https://.roadie.so/templates/actions` +- A subset of available actions in Roadie can also be **found at the following page inside your Roadie app**: `https://.roadie.so/create/actions` - We do not list actions created for hackathons and talks that are not maintained or intended for widespread use. ## Actions Summary Table From 6f9bc00dc319539367ad2c5637d40e7acd93541d Mon Sep 17 00:00:00 2001 From: sblausten Date: Tue, 3 Dec 2024 12:26:20 +0100 Subject: [PATCH 5/5] More tweaks --- .../docs/scaffolder/certified-templates/index.md | 3 +-- content/docs/scaffolder/custom-fields/index.md | 13 ++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/content/docs/scaffolder/certified-templates/index.md b/content/docs/scaffolder/certified-templates/index.md index 960da51e9..76d971055 100644 --- a/content/docs/scaffolder/certified-templates/index.md +++ b/content/docs/scaffolder/certified-templates/index.md @@ -10,8 +10,7 @@ When you start getting lots of templates and they start getting used a lot and r ### Grouping templates -Roadie Admin users can create groups or categories of templates that will show in the list page. This can be done via - +Roadie Admin users can create groups or categories of templates that will show in the list page. This can be done via the Settings page in the Scaffolder plugin config at `/administration/scaffolder`. ### Certified Templates diff --git a/content/docs/scaffolder/custom-fields/index.md b/content/docs/scaffolder/custom-fields/index.md index 84fc4be41..da4cd3613 100644 --- a/content/docs/scaffolder/custom-fields/index.md +++ b/content/docs/scaffolder/custom-fields/index.md @@ -1,26 +1,25 @@ --- -title: Custom Scaffolder Field Extensions +title: Custom Scaffolder Parameters publishedDate: '2024-02-28' -description: How to develop and register custom Scaffolder Field Extensions +description: How to develop and register custom Scaffolder Parameters --- -You can extend and customize the available Scaffolder functionality by using [Roadie Custom Plugins](/docs/custom-plugins/overview/). You can use the same workflow and development experience to build your own Custom Scaffolder Field Extensions as any other plugin, using the Roadie CLI. To see more information on how to develop custom plugins navigate to the Custom Plugins Documentation. +You can extend and customize the available Scaffolder functionality by using [Roadie Custom Plugins](/docs/custom-plugins/overview/). You can use the same workflow and development experience to build your own Custom Scaffolder Parameters as any other plugin, using the Roadie CLI. To see more information on how to develop custom plugins navigate to the Custom Plugins Documentation. To see more information on how to develop custom plugins. It is recommended to navigate to the [Custom Plugins Documentation](/docs/custom-plugins/getting-started/). ### Constructing React components for your Field Extension -To construct the correct type of React components that are compatible to be registered as Scaffolder Field Extensions, the recommended approach is to [follow the tutorial on the Open Source Backstage documentation page.](https://backstage.io/docs/features/software-templates/writing-custom-field-extensions/) +To construct the correct type of React components that are compatible to be registered as Scaffolder Parameters, the recommended approach is to [follow the tutorial on the Open Source Backstage documentation page.](https://backstage.io/docs/features/software-templates/writing-custom-field-extensions/) -### Registering your Field Extension +### Registering your Parameter -Scaffolder Field Extensions are automatically registered to be usable within Scaffolder Templates, once they have been registered as a Custom Plugin component to the Roadie application. You can do this by navigating to the `Administration` -> `Custom Plugins` page and registering your Custom Plugin bundle, including a component of type `ScaffolderFieldExtension`. +Scaffolder Parameter are automatically registered to be usable within Scaffolder Templates, once they have been registered as a Custom Plugin component to the Roadie application. You can do this by navigating to the `Administration` -> `Custom Plugins` page and registering your Custom Plugin bundle, including a component of type `ScaffolderFieldExtension`. ![Custom plugin registration form](custom_plugin_registration_form.webp) - ## Additional Resources * [Roadie CLI](https://www.npmjs.com/package/@roadiehq/roadie-cli)