Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@backstage/plugin-scaffolder-backend

backstage263kApache-2.01.32.1TypeScript support: included

The Backstage backend plugin that helps you create new things

backstage

readme

headline

Backstage

English | 한국어 | 中文版 | Français

License CNCF Status Discord Code style Codecov OpenSSF Best Practices OpenSSF Scorecard

What is Backstage?

Backstage is an open source framework for building developer portals. Powered by a centralized software catalog, Backstage restores order to your microservices and infrastructure and enables your product teams to ship high-quality code quickly without compromising autonomy.

Backstage unifies all your infrastructure tooling, services, and documentation to create a streamlined development environment from end to end.

software-catalog

Out of the box, Backstage includes:

  • Backstage Software Catalog for managing all your software such as microservices, libraries, data pipelines, websites, and ML models
  • Backstage Software Templates for quickly spinning up new projects and standardizing your tooling with your organization’s best practices
  • Backstage TechDocs for making it easy to create, maintain, find, and use technical documentation, using a "docs like code" approach
  • Plus, a growing ecosystem of open source plugins that further expand Backstage’s customizability and functionality

Backstage was created by Spotify but is now hosted by the Cloud Native Computing Foundation (CNCF) as an Incubation level project. For more information, see the announcement.

Project roadmap

For information about the detailed project roadmap including delivered milestones, see the Roadmap.

Getting Started

To start using Backstage, see the Getting Started documentation.

Documentation

The documentation of Backstage includes:

Community

To engage with our community, you can use the following resources:

Governance

See the GOVERNANCE.md document in the backstage/community repository.

License

Copyright 2020-2025 © The Backstage Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Security

Please report sensitive security issues using Spotify's bug-bounty program rather than GitHub.

For further details, see our complete security release process.

changelog

@backstage/plugin-scaffolder-backend

1.32.1

Patch Changes

  • 40de23c: Fixing a bug where the name for templatingExtensions was incorrectly set to templateExtensions

1.32.0

Minor Changes

  • 75e4db4: add template-extensions scaffolder service endpoint

Patch Changes

1.32.0-next.2

Patch Changes

1.32.0-next.1

Patch Changes

1.32.0-next.0

Minor Changes

  • 75e4db4: add template-extensions scaffolder service endpoint

Patch Changes

1.31.0

Minor Changes

  • 36677bb: Support new createTemplateAction type, and convert catalog:fetch action to new way of defining actions.
  • 2b1e50d: use CreatedTemplate[Filter|Global*] as canonical template extensions in scaffolder plugin

Patch Changes

1.31.0-next.2

Minor Changes

  • 36677bb: Support new createTemplateAction type, and convert catalog:fetch action to new way of defining actions.
  • 2b1e50d: use CreatedTemplate[Filter|Global*] as canonical template extensions in scaffolder plugin

Patch Changes

1.30.1-next.1

Patch Changes

1.30.1-next.0

Patch Changes

1.30.0

Minor Changes

  • dc8dd4b: Added new createTemplateFilter, createTemplateGlobalFunction, createTemplateGlobalValue for template extensions.
  • a4aa244: This change integrates the auditor service into the Scaffolder plugin.
  • 3d6ef79: Support file globbing in fs:delete
  • 91f3313: Added experimental flag for scaffolder to wait for running tasks to complete on shutdown

    Enabling the EXPERIMENTAL_gracefulShutdown flag in the scaffolder config will make the scaffolder block the shutdown process until all running tasks have completed. This is useful when there is a need to ensure that all tasks have completed before the scaffolder is shut down.

    Please note, that the TaskWorker stop method is now asynchronous and awaited for the tasks to complete when the experimental flag is enabled.

Patch Changes

1.30.0-next.3

Minor Changes

  • dc8dd4b: Added new createTemplateFilter, createTemplateGlobalFunction, createTemplateGlobalValue for template extensions.
  • 3d6ef79: Support file globbing in fs:delete

Patch Changes

1.30.0-next.2

Minor Changes

  • 91f3313: Added experimental flag for scaffolder to wait for running tasks to complete on shutdown

    Enabling the EXPERIMENTAL_gracefulShutdown flag in the scaffolder config will make the scaffolder block the shutdown process until all running tasks have completed. This is useful when there is a need to ensure that all tasks have completed before the scaffolder is shut down.

    Please note, that the TaskWorker stop method is now asynchronous and awaited for the tasks to complete when the experimental flag is enabled.

Patch Changes

1.30.0-next.1

Patch Changes

1.30.0-next.0

Minor Changes

  • a4aa244: This change integrates the auditor service into the Scaffolder plugin.

Patch Changes

1.29.0

Minor Changes

  • 5d9e5c8: Added the ability to use ${{ context.task.id }} in nunjucks templating, as well as ctx.task.id in actions to get the current task ID.

Patch Changes

1.29.0-next.2

Patch Changes

1.29.0-next.1

Patch Changes

1.29.0-next.0

Minor Changes

  • 5d9e5c8: Added the ability to use ${{ context.task.id }} in nunjucks templating, as well as ctx.task.id in actions to get the current task ID.

Patch Changes

1.28.0

Minor Changes

  • c05a343: Emit scaffolder events using the optional EventsService

Patch Changes

1.28.0-next.2

Patch Changes

1.28.0-next.1

Patch Changes

1.28.0-next.0

Minor Changes

  • c05a343: Emit scaffolder events using the optional EventsService

Patch Changes

1.27.0

Minor Changes

  • 0587633: Bumped the isolated-vm dependency from v4 to v5, which drops support for Node.js v16.
  • e61d5ef: BREAKING EXPERIMENTAL: The checkpoint method now takes an object instead of previous arguments.

    await ctx.checkpoint({ key: 'repo.create', fn: () => ockokit.repo.create({...})})

    You can also now return void from the checkpoint if the method returns void inside the checkpoint handler.

Patch Changes

1.27.0-next.3

Patch Changes

1.27.0-next.2

Patch Changes

1.27.0-next.1

Minor Changes

  • 0587633: Bumped the isolated-vm dependency from v4 to v5, which drops support for Node.js v16.

Patch Changes

1.26.3-next.0

Patch Changes

1.26.0

Minor Changes

  • 3ec4e6d: Added pagination support for listing of tasks and the ability to filter on several users and task statuses.
  • 3109c24: The export for the new backend system at the /alpha export is now also available via the main entry point, which means that you can remove the /alpha suffix from the import.

Patch Changes

1.26.0-next.2

Patch Changes

1.26.0-next.1

Patch Changes

1.26.0-next.0

Minor Changes

  • 3ec4e6d: Added pagination support for listing of tasks and the ability to filter on several users and task statuses.

Patch Changes

1.25.0

Minor Changes

  • df9ae9e: Added scaffolder action publish:bitbucketCloud:pull-request
  • 62898bd: createRouter and its related types has been marked as deprecared. This backend should instead be initialized using the new backend system.

Patch Changes

1.25.0-next.2

Minor Changes

  • df9ae9e: Added scaffolder action publish:bitbucketCloud:pull-request

Patch Changes

1.25.0-next.1

Patch Changes

1.25.0-next.0

Minor Changes

  • 62898bd: createRouter and its related types has been marked as deprecared. This backend should instead be initialized using the new backend system.

Patch Changes

1.24.0

Minor Changes

  • fc24d9e: Stop using @backstage/backend-tasks as it will be deleted in near future.
  • dcd6a79: Added OpenTelemetry support to Scaffolder metrics

Patch Changes

1.23.1-next.3

Patch Changes

1.23.1-next.2

Patch Changes

1.23.1-next.1

Patch Changes

1.23.1-next.0

Patch Changes

1.23.0

Minor Changes

  • b5deed0: Add support for autocomplete extension point to provide additional autocomplete handlers
  • 0b52438: Serialization of the scaffolder workspace into GCP bucket

Patch Changes

1.23.0-next.2

Patch Changes

  • ff1bb4c: Added a documentation how to use checkpoints

1.23.0-next.1

Patch Changes

1.23.0-next.0

Minor Changes

  • b5deed0: Add support for autocomplete extension point to provide additional autocomplete handlers
  • 0b52438: Serialization of the scaffolder workspace into GCP bucket

Patch Changes

1.22.9

Patch Changes

1.22.8-next.3

Patch Changes

1.22.8-next.2

Patch Changes

1.22.8-next.1

Patch Changes

1.22.8-next.0

Patch Changes

1.22.6

Patch Changes

1.22.6-next.2

Patch Changes

1.22.5-next.1

Patch Changes

1.22.5-next.0

Patch Changes

1.22.4

Patch Changes

1.22.4-next.1

Patch Changes

1.22.4-next.0

Patch Changes

1.22.3

Patch Changes

1.22.2

Patch Changes

1.22.1

Patch Changes

1.22.0

Minor Changes

  • e9663a9: Move away from using ctx.logStream
  • aa543c9: Migrate plugin to use the new auth services, add an optional service discovery to the router options and change the permissions type to be PermissionsService.
  • e9663a9: Enable the redaction of secrets using the redacting logger and the secrets from the TaskSpec
  • c6b132e: Introducing checkpoints for scaffolder task action idempotency

Patch Changes

1.22.0-next.2

Minor Changes

  • e9663a9: Move away from using ctx.logStream
  • e9663a9: Enable the redaction of secrets using the redacting logger and the secrets from the TaskSpec

Patch Changes

1.22.0-next.1

Minor Changes

  • aa543c9: Migrate plugin to use the new auth services, add an optional service discovery to the router options and change the permissions type to be PermissionsService.

Patch Changes

1.22.0-next.0

Minor Changes

  • c6b132e: Introducing checkpoints for scaffolder task action idempotency

Patch Changes

1.21.0

Minor Changes

  • 458bf21: Created a gitea module for the scaffolder. This module provides a new action "publish:gitea" able to create a gitea repository owned by an organization. See: https://gitea.com/api/swagger#/organization/createOrgRepo
  • 11b9a08: Introduced the first version of recoverable tasks.
  • 78c100b: Support providing an overriding token for fetch:template, fetch:plain and fetch:file when interacting with upstream integrations
  • e9a5228: The built-in module list has been trimmed down when using the new Backend System. Provider specific modules should now be installed with backend.add to provide additional actions to the scaffolder. These modules are as follows:

    • @backstage/plugin-scaffolder-backend-module-github
    • @backstage/plugin-scaffolder-backend-module-gitlab
    • @backstage/plugin-scaffolder-backend-module-bitbucket
    • @backstage/plugin-scaffolder-backend-module-gitea
    • @backstage/plugin-scaffolder-backend-module-gerrit
    • @backstage/plugin-scaffolder-backend-module-confluence-to-markdown
    • @backstage/plugin-scaffolder-backend-module-cookiecutter
    • @backstage/plugin-scaffolder-backend-module-rails
    • @backstage/plugin-scaffolder-backend-module-sentry
    • @backstage/plugin-scaffolder-backend-module-yeoman

Patch Changes

1.21.0-next.3

Patch Changes

1.21.0-next.2

Patch Changes

1.21.0-next.1

Minor Changes

  • 78c100b: Support providing an overriding token for fetch:template, fetch:plain and fetch:file when interacting with upstream integrations

Patch Changes

1.21.0-next.0

Minor Changes

  • 11b9a08: Introduced the first version of recoverable tasks.
  • e9a5228: The built-in module list has been trimmed down when using the new Backend System. Provider specific modules should now be installed with backend.add to provide additional actions to the scaffolder. These modules are as follows:

    • @backstage/plugin-scaffolder-backend-module-github
    • @backstage/plugin-scaffolder-backend-module-gitlab
    • @backstage/plugin-scaffolder-backend-module-bitbucket
    • @backstage/plugin-scaffolder-backend-module-gitea
    • @backstage/plugin-scaffolder-backend-module-gerrit
    • @backstage/plugin-scaffolder-backend-module-confluence-to-markdown
    • @backstage/plugin-scaffolder-backend-module-cookiecutter
    • @backstage/plugin-scaffolder-backend-module-rails
    • @backstage/plugin-scaffolder-backend-module-sentry
    • @backstage/plugin-scaffolder-backend-module-yeoman

Patch Changes

1.20.0

Minor Changes

  • a694f71: The Scaffolder builtin actions now contains an action for running pipelines from Bitbucket Cloud Rest API
  • 7c522c5: Add gitlab:repo:push scaffolder action to push files to arbitrary branch without creating a Merge Request

Patch Changes

1.19.3-next.2

Patch Changes

1.19.3-next.1

Patch Changes

1.19.3-next.0

Patch Changes

1.19.2

Patch Changes

1.19.2-next.3

Patch Changes

1.19.2-next.2

Patch Changes

1.19.2-next.1

Patch Changes

1.19.2-next.0

Patch Changes

1.19.0

Minor Changes

  • f3ab9cfcb7: Made shut down stale tasks configurable.

    There are two properties exposed:

    • scaffolder.processingInterval - sets the processing interval for staled tasks.
    • scaffolder.taskTimeoutJanitorFrequency - sets the task's heartbeat timeout, when to consider a task to be staled.
  • 7d5a921114: Allow using globby's negative matching with copyWithoutTemplating/copyWithoutRender. This allows including an entire subdirectory while excluding a single file so that it will still be templated instead of needing to list every other file and ensure the list is updated when new files are added.

  • 5e4127c18e: Allow setting update: true in publish:github:pull-request scaffolder action

Patch Changes

1.19.0-next.2

Patch Changes

1.19.0-next.1

Patch Changes

1.19.0-next.0

Minor Changes

  • 5e4127c18e: Allow setting update: true in publish:github:pull-request scaffolder action

Patch Changes

1.18.0

Minor Changes

  • dea0aafda7: Updated publish:gitlab action properties to support additional Gitlab project settings:

    • general project settings provided by gitlab project create API (new settings property)
    • branch level settings to create additional branches and make them protected (new branches property)
    • project level environment variables settings (new projectVariables property)

    Marked existed properties repoVisibility and topics as deprecated, as they are covered by settings property.

  • f41099bb31: Display meaningful error to the output if Gitlab namespace not found inside publish:gitlab.

Patch Changes

1.18.0-next.2

Minor Changes

  • dea0aafda7: Updated publish:gitlab action properties to support additional Gitlab project settings:

    • general project settings provided by gitlab project create API (new settings property)
    • branch level settings to create additional branches and make them protected (new branches property)
    • project level environment variables settings (new projectVariables property)

    Marked existed properties repoVisibility and topics as deprecated, as they are covered by settings property.

Patch Changes

1.18.0-next.1

Minor Changes

  • f41099bb31: Display meaningful error to the output if Gitlab namespace not found inside publish:gitlab.

Patch Changes

1.17.3-next.0

Patch Changes

1.17.0

Minor Changes

  • b5f239b50bcf: Improved the parseEntityRef Scaffolder filter by introducing the ability for users to provide default kind and/or namespace values. The filter now takes 2 arguments, similarly to the original parseEntityRef.
  • d5313ede3529: DEPRECATION: Deprecated ScaffolderEntitiesProcessor, which should now instead be imported from @backstage/plugin-catalog-backend-module-scaffolder-entity-model.

    catalogModuleTemplateKind was also moved to that package and renamed to catalogModuleScaffolderEntityModel, without any deprecation since it was an alpha export.

Patch Changes

1.17.0-next.3

Minor Changes

  • b5f239b50bcf: Improved the parseEntityRef Scaffolder filter by introducing the ability for users to provide default kind and/or namespace values. The filter now takes 2 arguments, similarly to the original parseEntityRef.
  • d5313ede3529: DEPRECATION: Deprecated ScaffolderEntitiesProcessor, which should now instead be imported from @backstage/plugin-catalog-backend-module-scaffolder-entity-model.

    catalogModuleTemplateKind was also moved to that package and renamed to catalogModuleScaffolderEntityModel, without any deprecation since it was an alpha export.

Patch Changes

1.16.6-next.2

Patch Changes

1.16.6-next.1

Patch Changes

1.16.3-next.0

Patch Changes

1.16.0

Minor Changes

  • e514aac3eac0: Introduce each property on action steps, allowing them to be ran repeatedly.

Patch Changes

1.15.2-next.2

Patch Changes

1.15.2-next.1

Patch Changes

1.15.2-next.0

Patch Changes

1.15.1

Patch Changes

1.15.1-next.1

Patch Changes

1.15.1-next.0

Patch Changes

1.15.0

Minor Changes

  • 84b0e47373db: Add TargetBranchName variable and output for the publish:gitlab:merge-request and publish:github:pull-request s'cascaffolder actions.
  • 6a694ce98e32: Add a scaffolder action that pull-requests for bitbucket server
  • 1948845861b0: Added github:deployKey:create and github:environment:create scaffolder actions. You will need to add read/write permissions to your GITHUB_TOKEN and/or Github Backstage App for Repository Administration (for deploy key functionality) and Environments (for Environment functionality)
  • df8411779da1: Add support for Repository Variables and Secrets to the publish:github and github:repo:create scaffolder actions. You will need to add read/write permissions to your GITHUB_TOKEN and/or Github Backstage App for Repository Secrets and Variables

    Upgrade octokit introduces some breaking changes.

Patch Changes

1.15.0-next.3

Minor Changes

  • 84b0e47373db: Add TargetBranchName variable and output for the publish:gitlab:merge-request and publish:github:pull-request s'cascaffolder actions.
  • 6a694ce98e32: Add a scaffolder action that pull-requests for bitbucket server
  • 1948845861b0: Added github:deployKey:create and github:environment:create scaffolder actions. You will need to add read/write permissions to your GITHUB_TOKEN and/or Github Backstage App for Repository Administration (for deploy key functionality) and Environments (for Environment functionality)

Patch Changes

1.15.0-next.2

Patch Changes

  • 11e0f625583f: Fix wrong gitlabUrl format in repoUrl input description
  • Updated dependencies

1.15.0-next.1

Minor Changes

  • df8411779da1: Add support for Repository Variables and Secrets to the publish:github and github:repo:create scaffolder actions. You will need to add read/write permissions to your GITHUB_TOKEN and/or Github Backstage App for Repository Secrets and Variables

    Upgrade octokit introduces some breaking changes.

Patch Changes

1.14.1-next.0

Patch Changes

1.14.0

Minor Changes

  • 67115f532b8: Expose both types of scaffolder permissions and rules through the metadata endpoint.

    The metadata endpoint now correctly exposes both types of scaffolder permissions and rules (for both the template and action resource types) through the metadata endpoint.

  • a73b3c0b097: Add ability to use defaultNamespace and defaultKind for scaffolder action catalog:fetch

Patch Changes

1.13.2-next.2

Patch Changes

1.13.2-next.1

Patch Changes

1.13.2-next.0

Patch Changes

1.13.0

Minor Changes

  • 2b15cb4aa0a: The non-PR/MR Git Actions now return the commit hash of the commit pushed as a new output called commitHash, isomorphic-git is now on version 1.23.0
  • 30ffdae70f9: Added fetch:plain:file action to fetch a single file, this action is also added to the list of built-in actions.
  • 65e989f4018: Added the possibility to authorize parameters and steps of a template

    The scaffolder plugin is now integrated with the permission framework. It is possible to toggle parameters or actions within templates by marking each section with specific tags, inside a backstage:permissions property under each parameter or action. Each parameter or action can then be permissioned by using a conditional decision containing the scaffolderTemplateRules.hasTag rule.

  • 3b68b09fc2d: Renamed permissionApi router option to permissions

  • bcae5aaf25c: Added the possibility to authorize actions

    It is now possible to decide who should be able to execute certain actions or who should be able to pass specific input to specified actions.

    Some of the existing utility functions for creating conditional decisions have been renamed:

    • createScaffolderConditionalDecision has been renamed to createScaffolderActionConditionalDecision
    • scaffolderConditions has been renamed to scaffolderTemplateConditions
  • d7c8c222e25: Allow for a commit message to differ from the PR title when publishing a GitHub pull request.

  • 95ea9f69b6f: Provide some more default filters out of the box and refactoring how the filters are applied to the SecureTemplater.

    • parseEntityRef will take an string entity triplet and return a parsed object.
    • pick will allow you to reference a specific property in the piped object.

    So you can now combine things like this: ${{ parameters.entity | parseEntityRef | pick('name') }} to get the name of a specific entity, or ${{ parameters.repoUrl | parseRepoUrl | pick('owner') }} to get the owner of a repo.

Patch Changes

1.13.0-next.3

Minor Changes

  • d7c8c222e25: Allow for a commit message to differ from the PR title when publishing a GitHub pull request.

Patch Changes

1.13.0-next.2

Patch Changes

1.13.0-next.1

Minor Changes

  • 30ffdae70f9: Added fetch:plain:file action to fetch a single file, this action is also added to the list of built-in actions.
  • 65e989f4018: Added the possibility to authorize parameters and steps of a template

    The scaffolder plugin is now integrated with the permission framework. It is possible to toggle parameters or actions within templates by marking each section with specific tags, inside a backstage:permissions property under each parameter or action. Each parameter or action can then be permissioned by using a conditional decision containing the scaffolderTemplateRules.hasTag rule.

  • 95ea9f69b6f: Provide some more default filters out of the box and refactoring how the filters are applied to the SecureTemplater.

    • parseEntityRef will take an string entity triplet and return a parsed object.
    • pick will allow you to reference a specific property in the piped object.

    So you can now combine things like this: ${{ parameters.entity | parseEntityRef | pick('name') }} to get the name of a specific entity, or ${{ parameters.repoUrl | parseRepoUrl | pick('owner') }} to get the owner of a repo.

Patch Changes

1.12.1-next.0

Patch Changes

1.12.0

Minor Changes

  • 7d724d8ef56: Added the ability to be able to define an actions input and output schema using zod instead of hand writing types and jsonschema

Patch Changes

1.12.0-next.2

Patch Changes

1.12.0-next.1

Minor Changes

  • 7d724d8ef56: Added the ability to be able to define an actions input and output schema using zod instead of hand writing types and jsonschema

Patch Changes

1.11.1-next.0

Patch Changes

1.11.0

Minor Changes

  • 0b2952ee4b: Added the option to overwrite files in the targetPath of the template:fetch action
  • 127154930f: Renamed the export scaffolderCatalogModule to catalogModuleTemplateKind in order to follow the new recommended naming patterns of backend system items. This is technically a breaking change but in an alpha export, so take care to change your imports if you have already migrated to the new backend system.

Patch Changes

1.11.0-next.2

Patch Changes

1.11.0-next.1

Minor Changes

  • 127154930f: Renamed the export scaffolderCatalogModule to catalogModuleTemplateKind in order to follow the new recommended naming patterns of backend system items. This is technically a breaking change but in an alpha export, so take care to change your imports if you have already migrated to the new backend system.

Patch Changes

1.11.0-next.0

Minor Changes

  • 0b2952ee4b: Added the option to overwrite files in the targetPath of the template:fetch action

Patch Changes

1.10.0

Minor Changes

  • a6808b67a7: Implement Required approving review count, Restrictions, and Required commit signing support for publish:github action
  • 04a2048fb8: Allow custom repository roles to be configured on github repos
  • c0ad7341f7: Add Scaffolder action catalog:fetch to get entity by entity reference from catalog
  • b44eb68bcb: This change adds changes to provide examples alongside scaffolder task actions.

    The createTemplateAction function now takes a list of examples e.g.

    const actionExamples = [
      {
        description: 'Example 1',
        example: yaml.stringify({
          steps: [
            {
              action: 'test:action',
              id: 'test',
              input: {
                input1: 'value',
              },
            },
          ],
        }),
      },
    ];
    
    export function createTestAction() {
      return createTemplateAction({
          id: 'test:action',
          examples: [
              {
                  description: 'Example 1',
                  examples: actionExamples
              }
          ],
          ...,
      });

    These examples can be retrieved later from the api.

    curl http://localhost:7007/api/scaffolder/v2/actions
    [
      {
        "id": "test:action",
        "examples": [
          {
            "description": "Example 1",
            "example": "steps:\n  - action: test:action\n    id: test\n    input:\n      input1: value\n"
          }
        ],
        "schema": {
          "input": {
            "type": "object",
            "properties": {
              "input1": {
                "title": "Input 1",
                "type": "string"
              }
            }
          }
        }
      }
    ]
  • 72d6b9f4e2: Added ability to override the commit message and author details for the publish:bitbucketServer action.

  • a69664faee: Add Github repository support for squash merge commit title and message options

Patch Changes

1.10.0-next.2

Patch Changes

1.10.0-next.1

Minor Changes

  • 04a2048fb8: Allow custom repository roles to be configured on github repos
  • a69664faee: Add Github repository support for squash merge commit title and message options

Patch Changes

1.9.1-next.0

Patch Changes

1.9.0

Minor Changes

  • a20a0ea698: Added requiredConversationResolution template option to github:repo:create, github:repo:push and publish:github
  • b32005e98a: Deprecated the taskWorkers option in RouterOptions in favor of concurrentTasksLimit which sets the limit of concurrent tasks in a single TaskWorker

    TaskWorker can now run multiple (defaults to 10) tasks concurrently using the concurrentTasksLimit option available in both RouterOptions and CreateWorkerOptions.

    To use the option to create a TaskWorker:

    const worker = await TaskWorker.create({
        taskBroker,
        actionRegistry,
        integrations,
        logger,
        workingDirectory,
        additionalTemplateFilters,
    +   concurrentTasksLimit: 10 // (1 to Infinity)
    });
  • fc51bd8aa0: Add support for disabling Github repository wiki, issues and projects

  • 0053d07bee: Update the github:publish action to allow passing wether to dismiss stale reviews on the protected default branch.

Patch Changes

1.9.0-next.3

Minor Changes

  • 0053d07bee: Update the github:publish action to allow passing wether to dismiss stale reviews on the protected default branch.

Patch Changes

1.9.0-next.2

Minor Changes

  • b32005e98a: Deprecated the taskWorkers option in RouterOptions in favor of concurrentTasksLimit which sets the limit of concurrent tasks in a single TaskWorker

    TaskWorker can now run multiple (defaults to 10) tasks concurrently using the concurrentTasksLimit option available in both RouterOptions and CreateWorkerOptions.

    To use the option to create a TaskWorker:

    const worker = await TaskWorker.create({
        taskBroker,
        actionRegistry,
        integrations,
        logger,
        workingDirectory,
        additionalTemplateFilters,
    +   concurrentTasksLimit: 10 // (1 to Infinity)
    });

Patch Changes

1.8.1-next.1

Patch Changes

1.8.1-next.0

Patch Changes

1.8.0

Minor Changes

  • ea14eb62a2: Added a set of default Prometheus metrics around scaffolding. See below for a list of metrics and an explanation of their labels:

    • scaffolder_task_count: Tracks successful task runs.

      Labels:

      • template: The entity ref of the scaffolded template
      • user: The entity ref of the user that invoked the template run
      • result: A string describing whether the task ran successfully, failed, or was skipped
    • scaffolder_task_duration: a histogram which tracks the duration of a task run

      Labels:

      • template: The entity ref of the scaffolded template
      • result: A boolean describing whether the task ran successfully
    • scaffolder_step_count: a count that tracks each step run

      Labels:

      • template: The entity ref of the scaffolded template
      • step: The name of the step that was run
      • result: A string describing whether the task ran successfully, failed, or was skipped
    • scaffolder_step_duration: a histogram which tracks the duration of each step run

      Labels:

      • template: The entity ref of the scaffolded template
      • step: The name of the step that was run
      • result: A string describing whether the task ran successfully, failed, or was skipped

    You can find a guide for running Prometheus metrics here: https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/prometheus-metrics.md

  • 5921b5ce49: - The GitLab Project ID for the publish:gitlab:merge-request action is now passed through the query parameter project in the repoUrl. It still allows people to not use the projectid and use the repoUrl with the owner and repo query parameters instead. This makes it easier to publish to repositories instead of writing the full path to the project.

  • 5025d2e8b6: Adds the ability to pass (an optional) array of strings that will be applied to the newly scaffolded repository as topic labels.

Patch Changes

1.8.0-next.2

Minor Changes

  • 5025d2e8b6: Adds the ability to pass (an optional) array of strings that will be applied to the newly scaffolded repository as topic labels.

Patch Changes

1.8.0-next.1

Minor Changes

  • 5921b5ce49: - The GitLab Project ID for the publish:gitlab:merge-request action is now passed through the query parameter project in the repoUrl. It still allows people to not use the projectid and use the repoUrl with the owner and repo query parameters instead. This makes it easier to publish to repositories instead of writing the full path to the project.

1.8.0-next.0

Minor Changes

  • ea14eb62a2: Added a set of default Prometheus metrics around scaffolding. See below for a list of metrics and an explanation of their labels:

    • scaffolder_task_count: Tracks successful task runs.

      Labels:

      • template: The entity ref of the scaffolded template
      • user: The entity ref of the user that invoked the template run
      • result: A string describing whether the task ran successfully, failed, or was skipped
    • scaffolder_task_duration: a histogram which tracks the duration of a task run

      Labels:

      • template: The entity ref of the scaffolded template
      • result: A boolean describing whether the task ran successfully
    • scaffolder_step_count: a count that tracks each step run

      Labels:

      • template: The entity ref of the scaffolded template
      • step: The name of the step that was run
      • result: A string describing whether the task ran successfully, failed, or was skipped
    • scaffolder_step_duration: a histogram which tracks the duration of each step run

      Labels:

      • template: The entity ref of the scaffolded template
      • step: The name of the step that was run
      • result: A string describing whether the task ran successfully, failed, or was skipped

    You can find a guide for running Prometheus metrics here: https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/prometheus-metrics.md

Patch Changes

1.7.0

Minor Changes

  • 253453fa14: Added a new property called additionalTemplateGlobals which allows you to add global functions to the scaffolder nunjucks templates.
  • 17ff77154c: Update the github:publish action to allow passing whether pull requests must be up to date with the default branch before merging.
  • 304305dd20: Add allowAutoMerge option for publish:github action
  • 694bfe2d61: Add functionality to shutdown scaffolder tasks if they are stale
  • a8e9848479: Added optional sourcePath parameter to publish:gitlab:merge-request action, targetPath is now optional and falls back to current workspace path.

Patch Changes

1.7.0-next.2

Minor Changes

  • 17ff77154c: Update the github:publish action to allow passing whether pull requests must be up to date with the default branch before merging.
  • a8e9848479: Added optional sourcePath parameter to publish:gitlab:merge-request action, targetPath is now optional and falls back to current workspace path.

Patch Changes

1.7.0-next.1

Patch Changes

1.7.0-next.0

Minor Changes

  • 253453fa14: Added a new property called additionalTemplateGlobals which allows you to add global functions to the scaffolder nunjucks templates.
  • 304305dd20: Add allowAutoMerge option for publish:github action
  • 694bfe2d61: Add functionality to shutdown scaffolder tasks if they are stale

Patch Changes

1.6.0

Minor Changes

  • ea2eee9e6a: Add the option for a homepage when using the github:publish action
  • 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options.

    To use this new implementation you need to create the instance of DatabaseTaskStore using the PluginDatabaseManager instead of Knex;

    import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common';
    import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend';
    
    const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() });
    const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } });
    const databaseTaskStore = await DatabaseTaskStore.create(databaseManager);
  • 7db9613671: Added projectId for gitlab projects to be displayed in the gitlab:publish output

  • d1f7ba58e3: Added repositoryId output when create a repository in Azure
  • 1ff817b3f0: add entity metadata to the template info type

Patch Changes

1.6.0-next.3

Patch Changes

1.6.0-next.2

Minor Changes

  • d1f7ba58e3: Added repositoryId output when create a repository in Azure

Patch Changes

1.6.0-next.1

Minor Changes

  • 7db9613671: Added projectId for gitlab projects to be displayed in the gitlab:publish output

Patch Changes

1.6.0-next.0

Minor Changes

  • ea2eee9e6a: Add the option for a homepage when using the github:publish action
  • 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options.

    To use this new implementation you need to create the instance of DatabaseTaskStore using the PluginDatabaseManager instead of Knex;

    import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common';
    import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend';
    
    const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() });
    const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } });
    const databaseTaskStore = await DatabaseTaskStore.create(databaseManager);
  • 1ff817b3f0: add entity metadata to the template info type

Patch Changes

1.5.1

Patch Changes

  • Fix minimum required version for vm2

1.5.0

Minor Changes

  • c4b452e16a: Starting the implementation of the Wizard page for the next scaffolder plugin
  • 593dea6710: Add support for Basic Auth for Bitbucket Server.
  • 3b7930b3e5: Add support for Bearer Authorization header / token-based auth at Git commands.
  • 3f1316f1c5: User Bearer Authorization header at Git commands with token-based auth at Bitbucket Server.
  • eeff5046ae: Updated publish:gitlab:merge-request action to allow commit updates and deletes
  • 692d5d3405: Added reviewers and teamReviewers parameters to publish:github:pull-request action to add reviewers on the pull request created by the action

Patch Changes

1.5.0-next.2

Minor Changes

  • 692d5d3405: Added reviewers and teamReviewers parameters to publish:github:pull-request action to add reviewers on the pull request created by the action

Patch Changes

1.5.0-next.1

Minor Changes

  • c4b452e16a: Starting the implementation of the Wizard page for the next scaffolder plugin

Patch Changes

1.5.0-next.0

Minor Changes

  • 593dea6710: Add support for Basic Auth for Bitbucket Server.
  • 3b7930b3e5: Add support for Bearer Authorization header / token-based auth at Git commands.
  • 3f1316f1c5: User Bearer Authorization header at Git commands with token-based auth at Bitbucket Server.
  • eeff5046ae: Updated publish:gitlab:merge-request action to allow commit updates and deletes

Patch Changes

1.4.0

Minor Changes

  • e1a08d872c: Added optional assignee parameter for Gitlab Merge Request action
  • dab9bcf2e7: Add protectEnforceAdmins as an option to GitHub publish actions
  • 4baf8a4ece: Update GitLab Merge Request Action to allow source branch to be deleted
  • 91c1d12123: Export experimental scaffolderCatalogExtension for the new backend system. This export is not considered stable and should not be used in production.
  • d10ccc2ed1: Introduced audit log message when a new scaffolder task is created
  • 2db07887cb: Added two new scaffolder actions: github:repo:create and github:repo:push

Patch Changes

  • ff316b86d8: Add copyWithoutTemplating to the fetch template action input. copyWithoutTemplating also accepts an array of glob patterns. Contents of matched files or directories are copied without being processed, but paths are subject to rendering.

    Deprecate copyWithoutRender in favor of copyWithoutTemplating.

  • 801d606909: Improve error messaging when passing in malformed auth

  • 089d846962: Fix issues with optional directories and files
  • ea6dcb84a4: Don't resolve symlinks, treat them as binary files and copy them as-is
  • af02f54483: new setUserAsOwner flag for publish:gitlab action

    The field default is false. When true it will use the token configured in the gitlab integration for the matching host, to try and set the user logged in via repoUrlPicker requestUserCredentials OAuth flow as owner of the repository created in GitLab.

  • a70869e775: Updated dependency msw to ^0.43.0.

  • 4e9a90e307: Updated dependency luxon to ^3.0.0.
  • 72622d9143: Updated dependency yaml to ^2.0.0.
  • 8006d0f9bf: Updated dependency msw to ^0.44.0.
  • 679b32172e: Updated dependency knex to ^2.0.0.
  • 511f49ee43: Updated dependency octokit to ^2.0.0.
  • 735853353b: Updated dependency @octokit/webhooks to ^10.0.0.
  • e2d7b76f43: Upgrade git-url-parse to 12.0.0.

    Motivation for upgrade is transitively upgrading parse-url which is vulnerable to several CVEs detected by Snyk.

    • SNYK-JS-PARSEURL-2935944
    • SNYK-JS-PARSEURL-2935947
    • SNYK-JS-PARSEURL-2936249
  • 945a27fa6a: Add sourcePath option to publish:gerrit action

  • 1764296a68: Allow to create Gerrit project using default owner
  • Updated dependencies

1.4.0-next.3

Minor Changes

  • 91c1d12123: Export experimental scaffolderCatalogExtension for the new backend system. This export is not considered stable and should not be used in production.

Patch Changes

1.4.0-next.2

Minor Changes

  • 4baf8a4ece: Update GitLab Merge Request Action to allow source branch to be deleted
  • 2db07887cb: Added two new scaffolder actions: github:repo:create and github:repo:push

Patch Changes

1.4.0-next.1

Patch Changes

1.4.0-next.0

Patch Changes

1.3.0

Minor Changes

  • 35a26131b3: DEPRECATION: The projectid input parameters to the publish:gitlab:merge-request, it's no longer required as it can be decoded from the repoUrl input parameter. DEPRECATION: The projectid output of the action in favour of projectPath
  • 72dfcbc8bf: A new scaffolder action has been added: gerrit:publish
  • ce0d8d7eb1: Fixed a bug in publish:github action that didn't permit to add users as collaborators. This fix required changing the way parameters are passed to the action. In order to add a team as collaborator, now you must use the team field instead of username. In order to add a user as collaborator, you must use the user field.

    It's still possible to use the field username but is deprecated in favor of team.

    - id: publish
      name: Publish
      action: publish:github
      input:
        repoUrl: ...
        collaborators:
          - access: ...
            team: my_team
          - access: ...
            user: my_username
  • 582003a059: - Added an optional list method on the TaskBroker and TaskStore interface to list tasks by an optional userEntityRef

    • Implemented a list method on the DatabaseTaskStore class to list tasks by an optional userEntityRef
    • Added a route under /v2/tasks to list tasks by a userEntityRef using the createdBy query parameter
  • c042c5eaff: Add an option to not protect the default branch.
  • f93af969cd: Added the ability to support running of templates that are not in the default namespace
  • 3500c13a33: Added a new /v2/dry-run endpoint that allows for a synchronous dry run of a provided template. A supportsDryRun option has been added to createTemplateAction, which signals whether the action should be executed during dry runs. When enabled, the action context will have the new isDryRun property set to signal if the action is being executed during a dry run.

Patch Changes

1.3.0-next.2

Minor Changes

  • ce0d8d7eb1: Fixed a bug in publish:github action that didn't permit to add users as collaborators. This fix required changing the way parameters are passed to the action. In order to add a team as collaborator, now you must use the team field instead of username. In order to add a user as collaborator, you must use the user field.

    It's still possible to use the field username but is deprecated in favor of team.

    - id: publish
      name: Publish
      action: publish:github
      input:
        repoUrl: ...
        collaborators:
          - access: ...
            team: my_team
          - access: ...
            user: my_username
  • 582003a059: - Added an optional list method on the TaskBroker and TaskStore interface to list tasks by an optional userEntityRef

    • Implemented a list method on the DatabaseTaskStore class to list tasks by an optional userEntityRef
    • Added a route under /v2/tasks to list tasks by a userEntityRef using the createdBy query parameter

Patch Changes

1.3.0-next.1

Minor Changes

  • c042c5eaff: Add an option to not protect the default branch.

Patch Changes

1.3.0-next.0

Minor Changes

  • 72dfcbc8bf: A new scaffolder action has been added: gerrit:publish

Patch Changes

1.2.0

Minor Changes

  • 9818112d12: Update the github:publish action to allow passing required status check contexts before merging to the main branch.
  • f8baf7df44: Added the ability to reference the user in the template.yaml manifest
  • 8d5a2238a9: Split publish:bitbucket into publish:bitbucketCloud and publish:bitbucketServer.

    In order to migrate from the deprecated action, you need to replace the use of action publish:bitbucket in your templates with the use of either publish:bitbucketCloud or publish:bitbucketServer - depending on which destination SCM provider you use.

    Additionally, these actions will not utilize integrations.bitbucket anymore, but integrations.bitbucketCloud or integrations.bitbucketServer respectively. You may or may not have migrated to these already.

    As described in a previous changeset, using these two replacement integrations configs will not compromise use cases which still rely on integrations.bitbucket as this was set up in a backwards compatible way.

    Additionally, please mind that the option enableLFS is only available (and always was) for Bitbucket Server use cases and therefore, is not even part of the schema for publish:bitbucketCloud anymore.

Patch Changes

1.2.0-next.1

Minor Changes

  • f8baf7df44: Added the ability to reference the user in the template.yaml manifest

Patch Changes

1.2.0-next.0

Minor Changes

  • 9818112d12: Update the github:publish action to allow passing required status check contexts before merging to the main branch.
  • 8d5a2238a9: Split publish:bitbucket into publish:bitbucketCloud and publish:bitbucketServer.

    In order to migrate from the deprecated action, you need to replace the use of action publish:bitbucket in your templates with the use of either publish:bitbucketCloud or publish:bitbucketServer - depending on which destination SCM provider you use.

    Additionally, these actions will not utilize integrations.bitbucket anymore, but integrations.bitbucketCloud or integrations.bitbucketServer respectively. You may or may not have migrated to these already.

    As described in a previous changeset, using these two replacement integrations configs will not compromise use cases which still rely on integrations.bitbucket as this was set up in a backwards compatible way.

    Additionally, please mind that the option enableLFS is only available (and always was) for Bitbucket Server use cases and therefore, is not even part of the schema for publish:bitbucketCloud anymore.

Patch Changes

1.1.0

Minor Changes

  • 2a7d52ca2c: Override default commit message and author details in GitLab action
  • f5f921dafb: Add new draft option to the publish:github:pull-request action.

Patch Changes

1.1.0-next.2

Patch Changes

1.1.0-next.1

Minor Changes

  • 2a7d52ca2c: Override default commit message and author details in GitLab action
  • f5f921dafb: Add new draft option to the publish:github:pull-request action.

Patch Changes

1.0.1-next.0

Patch Changes

1.0.0

Major Changes

  • b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our versioning policy.

Patch Changes

0.18.0

Minor Changes

  • 310e905998: The following deprecations are now breaking and have been removed:

    • BREAKING: Support for backstage.io/v1beta2 Software Templates has been removed. Please migrate your legacy templates to the new scaffolder.backstage.io/v1beta3 apiVersion by following the migration guide

    • BREAKING: Removed the deprecated TemplateMetadata. Please use TemplateInfo instead.

    • BREAKING: Removed the deprecated context.baseUrl. It's now available on context.templateInfo.baseUrl.

    • BREAKING: Removed the deprecated DispatchResult, use TaskBrokerDispatchResult instead.

    • BREAKING: Removed the deprecated runCommand, use executeShellCommond instead.

    • BREAKING: Removed the deprecated Status in favour of TaskStatus instead.

    • BREAKING: Removed the deprecated TaskState in favour of CurrentClaimedTask instead.

  • f9c7bdd899: BREAKING:

    • Removed the createFetchCookiecutterAction export, please use the @backstage/plugin-scaffolder-backend-module-cookiecutter package explicitly (see its README for installation instructions).
    • Removed the containerRunner argument from the types RouterOptions (as used by createRouter) and CreateBuiltInActionsOptions (as used by createBuiltinActions).
  • 5afbd16d43: BREAKING: Removed the previously deprecated OctokitProvider class.

Patch Changes

0.18.0-next.0

Minor Changes

  • 310e905998: The following deprecations are now breaking and have been removed:

    • BREAKING: Support for backstage.io/v1beta2 Software Templates has been removed. Please migrate your legacy templates to the new scaffolder.backstage.io/v1beta3 apiVersion by following the migration guide

    • BREAKING: Removed the deprecated TemplateMetadata. Please use TemplateInfo instead.

    • BREAKING: Removed the deprecated context.baseUrl. It's now available on context.templateInfo.baseUrl.

    • BREAKING: Removed the deprecated DispatchResult, use TaskBrokerDispatchResult instead.

    • BREAKING: Removed the deprecated runCommand, use executeShellCommond instead.

    • BREAKING: Removed the deprecated Status in favour of TaskStatus instead.

    • BREAKING: Removed the deprecated TaskState in favour of CurrentClaimedTask instead.

  • f9c7bdd899: BREAKING:

    • Removed the createFetchCookiecutterAction export, please use the @backstage/plugin-scaffolder-backend-module-cookiecutter package explicitly (see its README for installation instructions).
    • Removed the containerRunner argument from the types RouterOptions (as used by createRouter) and CreateBuiltInActionsOptions (as used by createBuiltinActions).
  • 5afbd16d43: BREAKING: Removed the previously deprecated OctokitProvider class.

Patch Changes

0.17.3

Patch Changes

0.17.2

Patch Changes

  • bug: repoUrl does not have a protocol in publish:github:pull-request

0.17.1

Patch Changes

  • bug: fixing repoUrl resolution for publish:github:pull-request action

0.17.0

Minor Changes

  • 91c6faeb7b: - BREAKING - the /v2/tasks endpoint now takes templateRef instead of templateName in the POST body. This should be a valid stringified entityRef.
  • 7f193ff019: - BREAKING - DatabaseTaskStore() constructor is now removed. Please use the DatabaseTaskStore.create() method instead.

    • BREAKING - TaskStore.createTask() method now only takes one argument of type TaskStoreCreateTaskOptions which encapsulates the spec and secrets
    - TaskStore.createTask(spec, secrets)
    + TaskStore.createTask({ spec, secrets})
    • BREAKING - TaskBroker.dispatch() method now only takes one argument of type TaskBrokerDispatchOptions which encapsulates the spec and secrets
    - TaskBroker.dispatch(spec, secrets)
    + TaskBroker.dispatch({ spec, secrets})
  • 9d9b2bab47: - BREAKING - Removed the re-export of types TaskSpec TaskSpecV1Beta2 and TaskSpecV1Beta3 these should now be import from @backstage/plugin-scaffolder-common directly.

    • BREAKING - Removed the observe method from the TaskBroker interface, this has now been replaced with an Observable implementation under `event# @backstage/plugin-scaffolder-backend.

Patch Changes

  • 9d9b2bab47: - DEPRECATED - Deprecated the runCommand export in favour of executeShellCommand. Please migrate to using the new method.
    • Added a type parameter to TaskStoreEmitOptions to type the body property
  • 65a7939c6c: - DEPRECATED - TaskState has been deprecated in favour of CurrentClaimedTask
    • Narrowed the types from JSONValue to JSONObject as the usage is and should always be JSONObject for complete and emitLog metadata in TaskContext
  • 67a7c02d26: Remove usages of EntityRef and parseEntityName from @backstage/catalog-model
  • ed09ad8093: Updated usage of the LocationSpec type from @backstage/catalog-model, which is deprecated.
  • 6981ac4ad2: - DEPRECATED - The containerRunner option passed to createBuiltinActions has now been deprecated.

    • DEPRECATED - The createFetchCookiecutterAction export has also been deprecated and will soon disappear from this plugin.

    The fetch:cookiecutter action will soon be removed from the default list of actions that are provided out of the box from the scaffolder plugin. It will still be supported, and maintained by the community, so you can install the package (@backstage/plugin-scaffolder-backend-module-cookiecutter) and pass it in as a custom action. Or you can migrate your templates to use fetch:template with the cookiecutterCompat option.

  • b1744f1153: - DEPRECATED - OctokitProvider has been deprecated and will be removed in upcoming versions This helper doesn't make sense to be export from the plugin-scaffolder-backend and possibly will be moved into the integrations package at a later date. All implementations have been moved over to a private implementation called getOctokitOptions which is then passed to the Octokit constructor. If you're using this API you should consider duplicating the logic that lives in getOctokitOptions and move away from the deprecated export.

  • 0f37cdef19: Migrated over from the deprecated spec.metadata to spec.templateInfo for the name and the baseUrl of the template.
  • 7f193ff019: - DEPRECATED - Status has been deprecated in favour of TaskStatus
    • DEPRECATED - CompletedTaskState has been deprecated in favour of TaskCompletionState
    • DEPRECATED - DispatchResult has been deprecated in favour of TaskBrokerDispatchResult
  • df61ca71dd: Implemented required getProcessorName method for catalog processor.
  • Updated dependencies

0.16.1

Patch Changes

0.16.0

Minor Changes

  • 661594bf43: BREAKING: Updated TemplateAction and related types to have its type parameter extend JsonObject instead of InputBase. The createTemplateAction has also been updated to pass through the TInput type parameter to the return type, meaning the TemplateAction retains its type. This can lead to breakages during type checking especially within tests.
  • 8db2b671c6: BREAKING: ctx.token is now ctx.secrets.backstageToken in Actions. Please update any of your Actions that might call out to Backstage API's with this token.
  • 5a1594330e: BREAKING - Removed the CatalogEntityClient export. This is no longer provider by this package, but you can implement one pretty simply yourself using the CatalogApi and applying filters to fetch templates.
  • 7d3471db94: Remove the previously deprecated scaffolder.provider config for all providers. This config is no longer used anywhere, and adopters should use integrations config instead.

Patch Changes

0.15.24

Patch Changes

0.15.24-next.0

Patch Changes

0.15.23

Patch Changes

0.15.23-next.1

Patch Changes

0.15.23-next.0

Patch Changes

0.15.22

Patch Changes

  • b09dd8f43b: chore(deps): bump @gitbeaker/node from 34.6.0 to 35.1.0
  • ac2f1eeec0: This change is for adding the option of inputs on the github:actions:dispatch Backstage Action. This will allow users to pass data from Backstage to the GitHub Action.
  • 0d5e846a78: Expose a new option to provide additional template filters via @backstage/scaffolder-backend's createRouter() function.
  • Updated dependencies

0.15.21

Patch Changes

0.15.21-next.0

Patch Changes

0.15.20

Patch Changes

0.15.19

Patch Changes

0.15.18

Patch Changes

0.15.17

Patch Changes

0.15.16

Patch Changes

0.15.15

Patch Changes

0.15.14

Patch Changes

0.15.13

Patch Changes

0.15.12

Patch Changes

  • 9990df8a1f: Expose some classes and interfaces public so TaskWorkers can run externally from the scaffolder API.
  • b45a34fb15: Adds a new endpoint for consuming logs from the Scaffolder that uses long polling instead of Server Sent Events.

    This is useful if Backstage is accessed from an environment that doesn't support SSE correctly, which happens in combination with certain enterprise HTTP Proxy servers.

    It is intended to switch the endpoint globally for the whole instance. If you want to use it, you can provide a reconfigured API to the scaffolderApiRef:

    // packages/app/src/apis.ts
    
    // ...
    import {
      scaffolderApiRef,
      ScaffolderClient,
    } from '@backstage/plugin-scaffolder';
    
    export const apis: AnyApiFactory[] = [
      // ...
    
      createApiFactory({
        api: scaffolderApiRef,
        deps: {
          discoveryApi: discoveryApiRef,
          identityApi: identityApiRef,
          scmIntegrationsApi: scmIntegrationsApiRef,
        },
        factory: ({ discoveryApi, identityApi, scmIntegrationsApi }) =>
          new ScaffolderClient({
            discoveryApi,
            identityApi,
            scmIntegrationsApi,
            // use long polling instead of an eventsource
            useLongPollingLogs: true,
          }),
      }),
    ];
  • a794c341ca: Fix a bug where only file mode 775 is considered an executable

  • Updated dependencies

0.15.11

Patch Changes

0.15.10

Patch Changes

0.15.9

Patch Changes

  • 0f99f1170e: Make sure sourcePath of publish:github:pull-request can only be used to retrieve files from the workspace.

0.15.8

Patch Changes

  • 42c618abf6: Use resolveSafeChildPath in the fetchContents function to forbid reading files outside the base directory when a template is registered from a file: location.
  • 18083d1821: Introduce the new scaffolder.backstage.io/v1beta3 template kind with nunjucks support 🥋
  • Updated dependencies

0.15.7

Patch Changes

0.15.6

Patch Changes

0.15.5

Patch Changes

0.15.4

Patch Changes

0.15.3

Patch Changes

  • 3f9dd1759: GitHub create repository webhook action: github:webhook for Backstage plugin Scaffolder has been added.
  • 774b08a5c: GitHubWebhook Action can be created with a default webhook secret. This allows getting secret from environment variable as an alternative to get it from context.
  • 536f4d844: Updated dependencies
  • 0b92a1e74: refactor: extract common Octokit related code and use it in actions: publish:github, github:actions:dispatch, github:webhook.
  • Updated dependencies

0.15.2

Patch Changes

0.15.1

Patch Changes

  • d622cfad1: GitHub branch protection option 'Require review from Code Owners' can be enabled by adding requireCodeOwnersReview: true in context input.

0.15.0

Minor Changes

  • e30646aeb: Add Bitbucket workspace and project fields to RepoUrlPicker to support Bitbucket cloud and server

Patch Changes

0.14.2

Patch Changes

  • 6cf48c609: Add the scaffolder.defaultCommitMessage, which defaults to Initial commit, so it can be customized.
  • 48ea3d25b: The recommended value for a backstage.io/techdocs-ref annotation is now dir:., indicating "documentation source files are located in the same directory relative to the catalog entity." Note that url:<location> values are still supported.
  • Updated dependencies

0.14.1

Patch Changes

0.14.0

Minor Changes

  • 96fc27698: Updated inputs for the publish:github:pull-request action.

    Now requires a repoUrl instead of separate owner and repo inputs. This aligns with the output of the RepoUrlPicker ui field used by the pull-request sample template.

Patch Changes

  • e75506fe7: Unsubscribe from broker after response is flushed
  • ea1d956ef: Updating fs-extra to 10.0.0 to handle broken symbolic links correctly
  • 31de5f27f: Add new fetch:template action which handles the same responsibilities as fetch:cookiecutter without the external dependency on cookiecutter. For information on migrating from fetch:cookiecutter to fetch:template, see the migration guide in the docs.
  • 84d329e2a: Scaffolder: Added an 'eq' handlebars helper for use in software template YAML files. This can be used to execute a step depending on the value of an input, e.g.:

    steps:
      id: 'conditional-step'
      action: 'custom-action'
      if: '{{ eq parameters.myvalue "custom" }}',
  • ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably.

  • Updated dependencies

0.13.0

Minor Changes

  • 60e830222: Support for Template kinds with version backstage.io/v1alpha1 has now been removed. This means that the old method of running templates with Preparers, Templaters and Publishers has also been removed. If you had any logic in these abstractions, they should now be moved to actions instead, and you can find out more about those in the documentation

    If you need any help migrating existing templates, there's a migration guide. Reach out to us on Discord in the #support channel if you're having problems.

    The scaffolder-backend now no longer requires these Preparers, Templaters, and Publishers to be passed in, now all it needs is the containerRunner.

    Please update your packages/backend/src/plugins/scaffolder.ts like the following

    - import {
    -  DockerContainerRunner,
    -  SingleHostDiscovery,
    - } from '@backstage/backend-common';
    + import { DockerContainerRunner } from '@backstage/backend-common';
      import { CatalogClient } from '@backstage/catalog-client';
    - import {
    -   CookieCutter,
    -   CreateReactAppTemplater,
    -   createRouter,
    -   Preparers,
    -   Publishers,
    -   Templaters,
    - } from '@backstage/plugin-scaffolder-backend';
    + import { createRouter } from '@backstage/plugin-scaffolder-backend';
      import Docker from 'dockerode';
      import { Router } from 'express';
      import type { PluginEnvironment } from '../types';
    
      export default async function createPlugin({
        config,
        database,
        reader,
    +   discovery,
      }: PluginEnvironment): Promise<Router> {
        const dockerClient = new Docker();
        const containerRunner = new DockerContainerRunner({ dockerClient });
    
    -   const cookiecutterTemplater = new CookieCutter({ containerRunner });
    -   const craTemplater = new CreateReactAppTemplater({ containerRunner });
    -   const templaters = new Templaters();
    
    -   templaters.register('cookiecutter', cookiecutterTemplater);
    -   templaters.register('cra', craTemplater);
    -
    -   const preparers = await Preparers.fromConfig(config, { logger });
    -   const publishers = await Publishers.fromConfig(config, { logger });
    
    -   const discovery = SingleHostDiscovery.fromConfig(config);
        const catalogClient = new CatalogClient({ discoveryApi: discovery });
    
        return await createRouter({
    -     preparers,
    -     templaters,
    -     publishers,
    +     containerRunner,
          logger,
          config,
          database,
    
  • 7cad18e2f: Adding config: Config as a required argument to createBuiltinActions and downstream methods in order to support configuration of the default git author used for Scaffolder commits.

    The affected methods are:

    • createBuiltinActions
    • createPublishGithubAction
    • createPublishGitlabAction
    • createPublishBitbucketAction
    • createPublishAzureAction

    Call sites to these methods will need to be migrated to include the new config argument. See createRouter in plugins/scaffolder-backend/src/service/router.ts for an example of adding this new argument.

    To configure the default git author, use the defaultAuthor key under scaffolder in app-config.yaml:

    scaffolder:
      defaultAuthor:
        name: Example
        email: example@example.com

Patch Changes

  • dad481793: add default branch property for publish GitLab, Bitbucket and Azure actions
  • 62c2f10f7: Added filesystem remove/rename built-in actions
  • 6841e0113: fix minor version of git-url-parse as 11.5.x introduced a bug for Bitbucket Server
  • 11e66e804: bump azure-devops-node to 10.2.2
  • 7a3ad92b5: Export the fetchContents from scaffolder-backend
  • c2db794f5: add defaultBranch property for publish GitHub action
  • 253136fba: removing mandatory of protection for the default branch, that could be handled by the GitHub automation in async manner, thus throwing floating errors
  • Updated dependencies

0.12.4

Patch Changes

0.12.3

Patch Changes

  • a7f5fe7d7: created an action to write a catalog-info file
  • 71416fb64: Moved installation instructions from the main backstage.io documentation to the package README file. These instructions are not generally needed, since the plugin comes installed by default with npx @backstage/create-app.
  • c18a3c2ae: Correctly recognize whether the cookiecutter command exists
  • Updated dependencies

0.12.2

Patch Changes

  • b49222176: Keep the empty string as empty string in input rather than replacing with undefined to make empty values ok for cookiecutter

0.12.1

Patch Changes

  • 55a834f3c: Use the correct parameter to create a public repository in Bitbucket Server for the v2 templates
  • 745351190: Describe publish:github scaffolder action fields

    This change adds a description to the fields with examples of what to input. The collaborators description is also expanded a bit to make it more clear that these are additional compared to access and owner.

  • 090dfe65d: Adds support to enable LFS for hosted Bitbucket

  • 878c1851d: Add a topics input to publish:github action that can be used to set topics on the repository upon creation.
  • 4ca322826: Migrate from the command-exists-promise dependency to command-exists.
  • df3ac03cf: Use the correct parameter to create a public repository in Bitbucket Server.
  • Updated dependencies

0.12.0

Minor Changes

  • 66c6bfebd: Scaffolding a repository in Bitbucket will now use the apiBaseUrl if it is provided instead of only the host parameter

Patch Changes

  • 27a9b503a: 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.

    - 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.

  • 55a253de2: Migrating old backstage.io/v1alpha1 templates to backstage.io/v1beta2

    Deprecating the create-react-app Template. We're planning on removing the create-react-app templater, as it's been a little tricky to support and takes 15mins to run in a container. We've currently cached a copy of the output for create-react-app and ship that under our sample templates folder. If you want to continue using it, we suggest copying the template out of there and putting it in your own repository as it will be removed in upcoming releases.

    We also recommend removing this entry from your app-config.yaml if it exists:

    -    - type: url
    -      target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml
    -      rules:
    -        - allow: [Template]
  • f26e6008f: Add debug:log action for debugging.

  • 4f8cf50fe: Update gitbeaker past the broken version without a dist folder
  • Updated dependencies [92963779b]
  • Updated dependencies [27a9b503a]
  • Updated dependencies [70bc30c5b]
  • Updated dependencies [eda9dbd5f]

0.11.5

Patch Changes

  • 6fe1567a7: This adds a configuration option to the scaffolder plugin router, so we can allow for multiple TaskWorkers. Currently with only one TaskWorker you are limited to scaffolding one thing at a time. Set the taskWorkers?: number option in your scaffolder router to get more than 1 TaskWorker
  • Updated dependencies [ebe802bc4]
  • Updated dependencies [49d7ec169]

0.11.4

Patch Changes

0.11.3

Patch Changes

  • 021eb366a: Instead of failing, warn when you need to pay for GitHub Pro.

0.11.2

Patch Changes

  • f7f7783a3: Add Owner field in template card and new data distribution Add spec.owner as optional field into TemplateV1Alpha and TemplateV1Beta Schema Add relations ownedBy and ownerOf into Template entity Template documentation updated
  • 65e6c4541: Remove circular dependencies
  • 81d7b9c6f: Added deprecation warnings for v1alpha1 templates
  • 9962faa2b: Add branch protection for default branches of scaffolded GitHub repositories
  • Updated dependencies [f7f7783a3]
  • Updated dependencies [c7dad9218]
  • Updated dependencies [65e6c4541]
  • Updated dependencies [68fdbf014]
  • Updated dependencies [5001de908]

0.11.1

Patch Changes

  • 062bbf90f: chore: bump @testing-library/user-event from 12.8.3 to 13.1.8
  • 82ca1ac22: The apiBaseUrl setting for Bitbucket Server integrations will now be used when it is set. Otherwise, it will default back to the host setting.
  • fd39d4662: Move jest-when to the dev dependencies
  • Updated dependencies [22fd8ce2a]
  • Updated dependencies [10c008a3a]
  • Updated dependencies [f9fb4a205]
  • Updated dependencies [16be1d093]

0.11.0

Minor Changes

  • e0bfd3d44: Migrate the plugin to use the ContainerRunner interface instead of runDockerContainer(…). It also provides the ContainerRunner to the individual templaters instead of to the createRouter function.

    To apply this change to an existing backend application, add the following to src/plugins/scaffolder.ts:

    - import { SingleHostDiscovery } from '@backstage/backend-common';
    + import {
    +   DockerContainerRunner,
    +   SingleHostDiscovery,
    + } from '@backstage/backend-common';
    
      export default async function createPlugin({
        logger,
        config,
        database,
        reader,
      }: PluginEnvironment): Promise<Router> {
    +   const dockerClient = new Docker();
    +   const containerRunner = new DockerContainerRunner({ dockerClient });
    
    +   const cookiecutterTemplater = new CookieCutter({ containerRunner });
    -   const cookiecutterTemplater = new CookieCutter();
    +   const craTemplater = new CreateReactAppTemplater({ containerRunner });
    -   const craTemplater = new CreateReactAppTemplater();
        const templaters = new Templaters();
    
        templaters.register('cookiecutter', cookiecutterTemplater);
        templaters.register('cra', craTemplater);
    
        const preparers = await Preparers.fromConfig(config, { logger });
        const publishers = await Publishers.fromConfig(config, { logger });
    
    -   const dockerClient = new Docker();
    
        const discovery = SingleHostDiscovery.fromConfig(config);
        const catalogClient = new CatalogClient({ discoveryApi: discovery });
    
        return await createRouter({
          preparers,
          templaters,
          publishers,
          logger,
          config,
    -     dockerClient,
          database,
          catalogClient,
          reader,
        });
      }

Patch Changes

0.10.1

Patch Changes

  • a1783f306: Added the nebula-preview preview to Octokit for repository visibility.

0.10.0

Minor Changes

  • 49574a8a3: Fix some spleling.

    The scaffolder-backend has a configuration schema change that may be breaking in rare circumstances. Due to a typo in the schema, the scaffolder.github.visibility, scaffolder.gitlab.visibility, and scaffolder.bitbucket.visibility did not get proper validation that the value is one of the supported strings (public, internal (not available for Bitbucket), and private). If you had a value that was not one of these three, you may have to adjust your config.

Patch Changes

  • 84c54474d: Forward user token to scaffolder task for subsequent api requests
  • Updated dependencies [d367f63b5]
  • Updated dependencies [b42531cfe]

0.9.6

Patch Changes

  • d8ffec739: Add built-in publish action for creating GitHub pull requests.
  • 7abec4dbc: Fix for the file:// protocol check in the FilePreparer being too strict, breaking Windows.
  • d840d30bc: Bitbucket server needs username to be set as well as the token or appPassword for the publishing process to work.

    integrations:
      bitbucket:
        - host: bitbucket.mycompany.com
          apiBaseUrl: https://bitbucket.mycompany.com/rest/api/1.0
          token: token
          username: username
  • b25846562: Enable the JSON parsing of the response from templated variables in the v2beta1 syntax. Previously if template parameters json strings they were left as strings, they are now parsed as JSON objects.

    Before:

    - id: test
      name: test-action
      action: custom:run
      input:
        input: '{"hello":"ben"}'

    Now:

    - id: test
      name: test-action
      action: custom:run
      input:
        input:
          hello: ben

    Also added the parseRepoUrl and json helpers to the parameters syntax. You can now use these helpers to parse work with some json or repoUrl strings in templates.

    - id: test
      name: test-action
      action: cookiecutter:fetch
      input:
        destination: '{{ parseRepoUrl parameters.repoUrl }}'

    Will produce a parsed version of the repoUrl of type { repo: string, owner: string, host: string } that you can use in your actions. Specifically cookiecutter with {{ cookiecutter.destination.owner }} like the plugins/scaffolder-backend/sample-templates/v1beta2-demo/template.yaml example.

  • a376e3ee8: Adds a collaborator field to GitHub publish action for multiple users and access levels

  • 423a514c3: Fix execution of the GitHub Pull Request publish action on Windows.
  • 0b7fd7a9d: Fix bug in pull request sample template.
  • Updated dependencies [bb5055aee]
  • Updated dependencies [5d0740563]
  • Updated dependencies [442f34b87]

0.9.5

Patch Changes

0.9.4

Patch Changes

0.9.3

Patch Changes

  • 9f2e51e89: Fixes bug in the github:publish action causing repositories to be set as private even if the visibility is set to internal
  • 91e87c055: Add inputs for action fetch:cookiecutter: copyWithoutRender, extensions, imageName
  • 113d3d59e: Added a publish:file action to use for local development. The action is not installed by default.

0.9.2

Patch Changes

0.9.1

Patch Changes

  • d7245b733: Remove runDockerContainer, and start using the utility function provided by @backstage/backend-common
  • 0b42fff22: Make use of parseLocationReference/stringifyLocationReference
  • c532c1682: Fixes task failures caused by undefined step input
  • 761698831: Bump to the latest version of the Knex library.
  • f98f212e4: Introduce scaffolder actions page which lists all available actions along with documentation about their input/output.

    Allow for actions to be extended with a description.

    The list actions page is by default available at /create/actions.

  • 2e57922de: Update GitHub publisher to display a more helpful error message when repository access update fails.

  • Updated dependencies [277644e09]
  • Updated dependencies [52f613030]
  • Updated dependencies [d7245b733]
  • Updated dependencies [0b42fff22]
  • Updated dependencies [0b42fff22]
  • Updated dependencies [905cbfc96]
  • Updated dependencies [761698831]
  • Updated dependencies [d4e77ec5f]

0.9.0

Minor Changes

  • 8106c9528: The scaffolder has been updated to support the new v1beta2 template schema which allows for custom template actions!

    See documentation for more information how to create and register new template actions.

    Breaking changes

    The backend scaffolder plugin now needs a UrlReader which can be pulled from the PluginEnvironment.

    The following change is required in backend/src/plugins/scaffolder.ts

     export default async function createPlugin({
       logger,
       config,
       database,
    +  reader,
     }: PluginEnvironment): Promise<Router> {
    
      // omitted code
    
      return await createRouter({
        preparers,
        templaters,
        publishers,
        logger,
        config,
        dockerClient,
        database,
        catalogClient,
    +   reader,
      });
  • 96ccc8f69: Removed support for deprecated publisher auth configuration within the scaffolder configuration block, such as scaffolder.github.token. Access should instead be configured through integrations configuration.

    For example, replace the following configuration in app-config.yaml

    scaffolder:
      github:
        token: my-token

    with

    integrations:
      github:
        - host: github.com
          token: my-token

Patch Changes

  • 12d8f27a6: Move logic for constructing the template form to the backend, using a new ./parameter-schema endpoint that returns the form schema for a given template.
  • 12d8f27a6: Add version backstage.io/v1beta2 schema for Template entities.
  • f31b76b44: Consider both authentication methods for both onprem and cloud BitBucket
  • f43192207: remove usage of res.send() for res.json() and res.end() to ensure content types are more consistently application/json on backend responses and error cases
  • d0ed25196: Fixed file path resolution for templates with a file location
  • Updated dependencies [12d8f27a6]
  • Updated dependencies [497859088]
  • Updated dependencies [8adb48df4]

0.8.0

Minor Changes

  • a5f42cf66: # Stateless scaffolding

    The scaffolder has been redesigned to be horizontally scalable and to persistently store task state and execution logs in the database.

    Each scaffolder task is given a unique task ID which is persisted in the database. Tasks are then picked up by a TaskWorker which performs the scaffolding steps. Execution logs are also persisted in the database meaning you can now refresh the scaffolder task status page without losing information.

    The task status page is now dynamically created based on the step information stored in the database. This allows for custom steps to be displayed once the next version of the scaffolder template schema is available.

    The task page is updated to display links to both the git repository and to the newly created catalog entity.

    Component registration has moved from the frontend into a separate registration step executed by the TaskWorker. This requires that a CatalogClient is passed to the scaffolder backend instead of the old CatalogEntityClient.

    Make sure to update plugins/scaffolder.ts

     import {
       CookieCutter,
       createRouter,
       Preparers,
       Publishers,
       CreateReactAppTemplater,
       Templaters,
    -  CatalogEntityClient,
     } from '@backstage/plugin-scaffolder-backend';
    
    +import { CatalogClient } from '@backstage/catalog-client';
    
     const discovery = SingleHostDiscovery.fromConfig(config);
    -const entityClient = new CatalogEntityClient({ discovery });
    +const catalogClient = new CatalogClient({ discoveryApi: discovery })
    
     return await createRouter({
       preparers,
       templaters,
       publishers,
       logger,
       config,
       dockerClient,
    -  entityClient,
       database,
    +  catalogClient,
     });

    As well as adding the @backstage/catalog-client packages as a dependency of your backend package.

Patch Changes

0.7.1

Patch Changes

  • edbc27bfd: Added githubApp authentication to the scaffolder-backend plugin
  • fb28da212: Switched to using 'x-access-token' for authenticating Git over HTTPS towards GitHub.
  • 0ada34a0f: Minor typo in migration
  • 29c8bcc53: Fixed the prepare step for when using local templates that were added to the catalog using the file: target configuration. No more EPERM: operation not permitted error messages.
  • a341a8716: Fix parsing of the path to default to empty string not undefined if git-url-parse throws something we don't expect. Fixes the error The "path" argument must be of type string. when preparing.
  • Updated dependencies [16fb1d03a]
  • Updated dependencies [491f3a0ec]
  • Updated dependencies [491f3a0ec]
  • Updated dependencies [434b4e81a]
  • Updated dependencies [fb28da212]

0.7.0

Minor Changes

  • 615103a63: Introduced v2 Scaffolder REST API, which uses an implementation that is database backed, making the scaffolder instances stateless. The createRouter function now requires a PluginDatabaseManager instance to be passed in, commonly available as database in the plugin environment in the backend.

    This API should be considered unstable until used by the scaffolder frontend.

Patch Changes

  • 6ed2b47d6: Include Backstage identity token in requests to backend plugins.
  • ffffea8e6: Minor updates to reflect the changes in @backstage/integration that made the fields apiBaseUrl and apiUrl mandatory.
  • Updated dependencies [6ed2b47d6]
  • Updated dependencies [ffffea8e6]
  • Updated dependencies [82b2c11b6]
  • Updated dependencies [965e200c6]
  • Updated dependencies [ffffea8e6]
  • Updated dependencies [72b96e880]
  • Updated dependencies [5a5163519]

0.6.0

Minor Changes

  • cdea0baf1: The scaffolder is updated to generate a unique workspace directory inside the temp folder. This directory is cleaned up by the job processor after each run.

    The prepare/template/publish steps have been refactored to operate on known directories, template/ and result/, inside the temporary workspace path.

    Updated preparers to accept the template url instead of the entire template. This is done primarily to allow for backwards compatibility between v1 and v2 scaffolder templates.

    Fixes broken GitHub actions templating in the Create React App template.

    For those with custom preparers, templates, or publishers

    The preparer interface has changed, the prepare method now only takes a single argument, and doesn't return anything. As part of this change the preparers were refactored to accept a URL pointing to the target directory, rather than computing that from the template entity.

    The workingDirectory option was also removed, and replaced with a workspacePath option. The difference between the two is that workingDirectory was a place for the preparer to create temporary directories, while the workspacePath is the specific folder were the entire templating process for a single template job takes place. Instead of returning a path to the folder were the prepared contents were placed, the contents are put at the <workspacePath>/template path.

    type PreparerOptions = {
    -  workingDirectory?: string;
    +  /**
    +   * Full URL to the directory containg template data
    +   */
    +  url: string;
    +  /**
    +   * The workspace path that will eventually be the the root of the new repo
    +   */
    +  workspacePath: string;
      logger: Logger;
    };
    
    -prepare(template: TemplateEntityV1alpha1, opts?: PreparerOptions): Promise<string>
    +prepare(opts: PreparerOptions): Promise<void>;

    Instead of returning a path to the folder were the templaters contents were placed, the contents are put at the <workspacePath>/result path. All templaters now also expect the source template to be present in the template directory within the workspacePath.

    export type TemplaterRunOptions = {
    -  directory: string;
    +  workspacePath: string;
      values: TemplaterValues;
      logStream?: Writable;
      dockerClient: Docker;
    };
    
    -public async run(options: TemplaterRunOptions): Promise<TemplaterRunResult>
    +public async run(options: TemplaterRunOptions): Promise<void>

    Just like the preparer and templaters, the publishers have also switched to using workspacePath. The root of the new repo is expected to be located at <workspacePath>/result.

    export type PublisherOptions = {
      values: TemplaterValues;
    -  directory: string;
    +  workspacePath: string;
      logger: Logger;
    };

Patch Changes

  • a26668913: Attempt to fix windows test errors in master
  • 529d16d27: # Repo visibility for GitLab and BitBucket repos

    NOTE: This changes default repo visibility from private to public for GitLab and BitBucket which is consistent with the GitHub default. If you were counting on private visibility, you'll need to update your scaffolder config to use private.

    This adds repo visibility feature parity with GitHub for GitLab and BitBucket.

    To configure the repo visibility, set scaffolder.type.visibility as in this example:

    scaffolder:
      github:
        visibility: private # 'public' or 'internal' or 'private' (default is 'public')
      gitlab:
        visibility: public # 'public' or 'internal' or 'private' (default is 'public')
      bitbucket:
        visibility: public # 'public' or 'private' (default is 'public')
  • Updated dependencies [c4abcdb60]

  • Updated dependencies [2430ee7c2]
  • Updated dependencies [6e612ce25]
  • Updated dependencies [025e122c3]
  • Updated dependencies [064c513e1]
  • Updated dependencies [7881f2117]
  • Updated dependencies [3149bfe63]
  • Updated dependencies [2e62aea6f]
  • Updated dependencies [11cb5ef94]

0.5.2

Patch Changes

  • 26a3a6cf0: Honor the branch ref in the url when cloning.

    This fixes a bug in the scaffolder prepare stage where a non-default branch was specified in the scaffolder URL but the default branch was cloned. For example, even though the other branch is specified in this example, the master branch was actually cloned:

    catalog:
      locations:
        - type: url
          target: https://github.com/backstage/backstage/blob/other/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml

    This also fixes a 404 in the prepare stage for GitLab URLs.

  • 9dd057662: Upgrade git-url-parse to v11.4.4 which fixes parsing an Azure DevOps branch ref.

  • Updated dependencies [26a3a6cf0]
  • Updated dependencies [664dd08c9]
  • Updated dependencies [6800da78d]
  • Updated dependencies [9dd057662]

0.5.1

Patch Changes

  • 0ea002378: Fixing issues with templating and full URL's as storePath's

0.5.0

Minor Changes

  • ed6baab66: - Deprecating the scaffolder.${provider}.token auth duplication and favoring integrations.${provider} instead. If you receive deprecation warnings your config should change like the following:

    scaffolder:
      github:
        token:
          $env: GITHUB_TOKEN
        visibility: public

    To something that looks like this:

    integration:
      github:
        - host: github.com
          token:
            $env: GITHUB_TOKEN
    scaffolder:
      github:
        visibility: public

    You can also configure multiple different hosts under the integration config like the following:

    integration:
      github:
        - host: github.com
          token:
            $env: GITHUB_TOKEN
        - host: ghe.mycompany.com
          token:
            $env: GITHUB_ENTERPRISE_TOKEN

    This of course is the case for all the providers respectively.

    • Adding support for cross provider scaffolding, you can now create repositories in for example Bitbucket using a template residing in GitHub.

    • Fix GitLab scaffolding so that it returns a catalogInfoUrl which automatically imports the project into the catalog.

    • The Store Path field on the scaffolder frontend has now changed so that you require the full URL to the desired destination repository.

    backstage/new-repository would become https://github.com/backstage/new-repository if provider was GitHub for example.

Patch Changes

0.4.1

Patch Changes

  • 94fdf4955: Get rid of all usages of @octokit/types, and bump the rest of the octokit dependencies to the latest version
  • cc068c0d6: Bump the gitbeaker dependencies to 28.x.

    To update your own installation, go through the package.json files of all of your packages, and ensure that all dependencies on @gitbeaker/node or @gitbeaker/core are at version ^28.0.2. Then run yarn install at the root of your repo.

  • 711ba55a2: Export all preparers and publishers properly

  • Updated dependencies [466354aaa]
  • Updated dependencies [f3b064e1c]
  • Updated dependencies [abbee6fff]
  • Updated dependencies [147fadcb9]

0.4.0

Minor Changes

  • 5eb8c9b9e: Fix GitLab scaffolder publisher

Patch Changes

  • 7e3451700: bug(scaffolder): Ignore the .git folder when adding dot-files to the index

0.3.7

Patch Changes

  • 37a5244ef: Add scaffolding support for Bitbucket Cloud and Server.
  • 00042e73c: Moving the Git actions to isomorphic-git instead of the node binding version of nodegit
  • 9efbc5585: Add config schema for Bitbucket scaffolder
  • Updated dependencies [5ecd50f8a]
  • Updated dependencies [00042e73c]
  • Updated dependencies [0829ff126]
  • Updated dependencies [036a84373]

0.3.6

Patch Changes

  • 19554f6d6: Added GitHub Actions for Create React App, and allow better imports of files inside a module when they're exposed using files in package.json
  • 33a82a713: GitLab preparer uses the right token (primarily the same one as the publisher, falling back to the integrations token)
  • aed8f7f12: Clearer error message when preparer or publisher type can't be determined.

0.3.5

Patch Changes

  • 94c65a9d4: Added configuration schema for the commonly used properties
  • Updated dependencies [c911061b7]
  • Updated dependencies [1d1c2860f]
  • Updated dependencies [0e6298f7e]
  • Updated dependencies [4eafdec4a]
  • Updated dependencies [ac3560b42]

0.3.4

Patch Changes

0.3.3

Patch Changes

0.3.2

Patch Changes

  • ef2831dde: Move constructing the catalog-info.yaml URL for scaffolded components to the publishers
  • 5a1d8dca3: Fix React entity YAML filename to new standard
  • Updated dependencies [1166fcc36]
  • Updated dependencies [bff3305aa]
  • Updated dependencies [1185919f3]
  • Updated dependencies [b47dce06f]

0.3.1

Patch Changes

  • d33f5157c: Extracted pushToRemote function for reuse between publishers
  • Updated dependencies [1722cb53c]
  • Updated dependencies [1722cb53c]
  • Updated dependencies [7b37e6834]
  • Updated dependencies [8e2effb53]

0.3.0

Minor Changes

  • 59166e5ec: createRouter of scaffolder backend will now require additional option as entityClient which could be generated by CatalogEntityClient in plugin-scaffolder-backend package. Here is example to generate entityClient.

    import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend';
    import { SingleHostDiscovery } from '@backstage/backend-common';
    
    const discovery = SingleHostDiscovery.fromConfig(config);
    const entityClient = new CatalogEntityClient({ discovery });
    • Scaffolder's API /v1/jobs will accept templateName instead of template Entity.

Patch Changes

0.2.0

Minor Changes

  • 3e254503d: Add Azure DevOps support to the scaffolder backend

    This adds support for Azure DevOps to the scaffolder (preparer & publisher). I thought I should get this in there now since #2426 has been merged. I had a previous PR with only the preparer but I closed that in favor of this one.

    I stayed with the 'azure/api' structure but I guess we should try and go the same way as with GitHub here #2501

Patch Changes

  • 0c370c979: Update SSR template to pass CI
  • 991a950e0: Added .fromConfig static factories for Preparers and Publishers + read integrations config to support url location types
  • c926765a2: Allow templates to be located on non-default branch
  • 6840a68df: Add authentication token to Scaffolder GitHub Preparer
  • 1c8c43756: The new scaffolder.github.baseUrl config property allows to specify a custom base url for GitHub Enterprise instances
  • 5e4551e3a: Added support for configuring the working directory of the Scaffolder:

    backend:
      workingDirectory: /some-dir # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
  • e3d063ffa: Introduce PreparerOptions for PreparerBase

  • Updated dependencies [3a4236570]
  • Updated dependencies [e0be86b6f]
  • Updated dependencies [f70a52868]
  • Updated dependencies [12b5fe940]
  • Updated dependencies [5249594c5]
  • Updated dependencies [56e4eb589]
  • Updated dependencies [e37c0a005]
  • Updated dependencies [a768a07fb]
  • Updated dependencies [f00ca3cb8]
  • Updated dependencies [6579769df]
  • Updated dependencies [5adfc005e]
  • Updated dependencies [8c2b76e45]
  • Updated dependencies [440a17b39]
  • Updated dependencies [fa56f4615]
  • Updated dependencies [8afce088a]
  • Updated dependencies [b3d57961c]
  • Updated dependencies [7bbeb049f]