1. Introduction
    2. Software Catalog basics
    3. Removing the example entities
    4. Creating a software component
    5. Registering a component
    6. Moving towards a production instance
    1. Creating new components using Backstage
    2. Anatomy of a Software Template
    3. Writing new Software Templates
    4. Scaffolder actions
    5. Software Templates at Spotify
    1. Knowledge check

Setting up Software Templates

45 MINS

Scaffolder actions

Each action field under the steps section of template.yaml is known as Scaffolder actions.

  • The scaffolder plugin comes with several built-in actions for fetching content, registering in the catalog and of course actions for creating and publishing a git repository.

  • There are several repository providers supported out of the box such as GitHub, Azure, GitLab and Bitbucket. A list of all registered actions can be found under /create/actions. For local development you should be able to reach them at http://localhost:3000/create/actions.

Some of the most used built-in actions are:

Built-in actionsDescription
fetch:plainDownloads a template and copies the files over without templating
fetch:cookiecutter(Use fetch:template over this) Downloads a template from the given URL, and runs cookiecutter on it.
fetch:templateDownloads a skeleton, templates variables into file and directory names and content, and places the result in a given path
publish:github publish:gitlab publish:bitbucket publish:azurePublishes the templated files and folder into a new repository
publish:github:pull-request(Used with mono-repos) Creates a Pull Request with the newly created component files
github:webhookCreates a GitHub webhook
fs:deleteDeletes files and directories from the workspace
catalog:registerRegisters entities from a catalog descriptor file in the workspace into the software catalog.

You can create your own Scaffolder actions for anything you can imagine being used as part of the Create flow in your organization. Read more, Writing Custom Actions

A note on RepoUrlPicker

In the template.yaml file of the template we created, you must have noticed ui:field: RepoUrlPicker in the spec.parameters field. This is known as Scaffolder Field Extensions.

These field extensions are used in taking certain types of input from users like GitHub repository URL, teams registered in catalog for the owners field, etc. Such field extensions can also be customized for your own organization. See Writing Custom Field Extensions