diff --git a/.changeset/khaki-dancers-admire.md b/.changeset/khaki-dancers-admire.md new file mode 100644 index 0000000000..7c5c61aa90 --- /dev/null +++ b/.changeset/khaki-dancers-admire.md @@ -0,0 +1,23 @@ +--- +'@backstage/catalog-model': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-scaffolder-backend': patch +--- + +Introduce conditional steps in scaffolder templates. + +A step can now include an `if` property that only executes a step if the +condition is truthy. The condition can include handlebar templates. + +```yaml +- id: register + if: '{{ not parameters.dryRun }}' + name: Register + action: catalog:register + input: + repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}' + catalogInfoPath: '/catalog-info.yaml' +``` + +Also introduces a `not` helper in handlebar templates that allows to negate +boolean expressions. diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index d91b840292..5b8624c97f 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -262,6 +262,7 @@ tooltips touchpoints transpilation transpiled +truthy ui unmanaged unregister