Builtin actions
The scaffolder 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
.
Migrating from fetch:cookiecutter
to fetch:template
The fetch:template
action is a new action with a similar API to
fetch:cookiecutter
but no dependency on cookiecutter
. There are two options
for migrating templates that use fetch:cookiecutter
to use fetch:template
:
Using cookiecutterCompat
mode
The new fetch:template
action has a cookiecutterCompat
flag which should
allow most templates built for fetch:cookiecutter
to work without any changes.
- Update action name in
template.yaml
. The name should be changed fromfetch:cookiecutter
tofetch:template
. - Set
cookiecutterCompat
totrue
in thefetch:template
step input intemplate.yaml
.
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
action: fetch:template
input:
url: ./skeleton
cookiecutterCompat: true
values:
Manual migration
If you prefer, you can manually migrate your templates to avoid the need for enabling cookiecutter compatibility mode, which will result in slightly less verbose template variables expressions.
- Update action name in
template.yaml
. The name should be changed fromfetch:cookiecutter
tofetch:template
. - Update variable syntax in file names and content.
fetch:cookiecutter
expects variables to be enclosed in{{
}}
and prefixed withcookiecutter.
, whilefetch:template
expects variables to be enclosed in${{
}}
and prefixed withvalues.
. For example, a reference to variablemyInputVariable
would need to be migrated from{{ cookiecutter.myInputVariable }}
to${{ values.myInputVariable }}
. - Replace uses of
jsonify
withdump
. Thejsonify
filter is built in tocookiecutter
, and is not available by default when usingfetch:template
. Thedump
filter is the equivalent filter in nunjucks, so an expression like{{ cookiecutter.myAwesomeList | jsonify }}
should be migrated to${{ values.myAwesomeList | dump }}
.