Skip to main content
Template expressions let you insert dynamic values into pipeline config. Wrap a dot-path expression in << ... >> inside any templateable field value:
Expressions are simple dot paths — there are no operators, functions, or conditionals. Each expression resolves to a value from one of the context namespaces below.

Syntax

Block expressions

When the entire value is a single << ... >> expression, the resolved value keeps its original type. This is how you pass numbers, booleans, objects, and arrays through templates:

String interpolation

Mix one or more expressions with literal text. Each expression is evaluated, converted to a string, and concatenated. The result is always a string:

Context namespaces

pipeline.input

References the values of inputs declared in the pipeline’s inputs list. Input values come from, in order of precedence: hard-coded variant input values, values passed when the run is triggered, then the input’s default.

pipeline.run and pipeline.variant

Run metadata and the variant the run was started with: Variants plus templating are how one pipeline serves multiple environments: name your variant IDs after your environment given IDs, then reference modules as << pipeline.variant.id >>.web-app. See Pipeline variants.

steps

References the outputs and inputs of other steps. The step ID must exist in the pipeline — referencing an unknown step fails validation — and expressions resolve in DAG dependency order, so a step referencing steps.build_web_app.output.* runs after build_web_app completes.
Available outputs depend on the step type. For example, build steps output build_ref, image_uri, image_digest, and status, while deploy steps output deployment_id, status, and success. CI steps additionally output exit_code, success, and duration_ms.

trigger.payload

Only available inside a trigger’s run block, to map event data into pipeline inputs:

Templateable fields

Not every field accepts templates. Templateable fields are marked in the pipeline configuration reference. Highlights:
  • Common step fields: timeout, if
  • Module steps: module_instance, description, input
  • CI build steps: source, builder and its nested fields (dockerfile, context, build_cmd, …), environment_variables, debug
Fields that identify structure — like step id, name, and type — are not templateable.

Conditional steps with if

The if field accepts a boolean literal or a full block expression that resolves to a boolean:

Type rules

After resolution, the value must match the field’s declared type: A mismatch — for example, a timeout expression resolving to a string — fails with a template_type_mismatch error.