Runner and PlugsHow-to guides
Share configuration between files with !include
Reuse plugs across repositories and build variants of a configuration.
!include replaces a node with the contents of another YAML file. The path is resolved relative to
the file that contains the tag.
Reuse a list of plugs
Put the plugs in a file that contains a sequence:
- use: blaise:shell
with:
start: bun install --frozen-lockfile
- use: blaise:shell
with:
start: bun run buildInclude it where the plugs should run. A sequence included in a sequence is spliced in place, so the file contributes several plugs:
version: 1
setup:
- use: blaise:env
with:
files: [.env.agent]
- !include ./blaise/node-project.ymlAn included mapping becomes a single item.
Make a variant of a configuration
Merge a base file and replace only what differs. Keys in the including mapping win:
<<: !include ./blaise.yml
setup:
- use: blaise:docker
with:
image: buildpack-deps:bookworm
- !include ./blaise/node-project.ymlSelect the variant with --config blaise.docker.yml.
Things to know
- Each file is its own YAML document, so anchors do not cross files. Repeat the value in the included file, or pass it through a plug input.
use: ./plug.tsin an included file is relative to that file, not to the including file.- Includes nest. A cycle is an error that names the chain of files.
- Hidden keys (
.name) hold anchors in the file that defines them. See the configuration reference.