Environment Variables
Environment variables let you pass non-sensitive configuration values—such as region codes, feature flags, or default bucket names—into Workflow expressions.
They are declared once, at the top level of the Workflow definition, with the envs property and are referenced inside the Workflow with the predefined $ENVS object.
Declaring environment variables
{
"id": "image-pipeline",
"envs": ["DEFAULT_REGION", "PUBLIC_BUCKET", "FEATURE_FLAG"],
...
}Add every required variable to the
envsarray.At runtime, the engine is responsible for supplying the actual values (for example via process env, a
.envfile, or an orchestration secret store).
Using environment variables in expressions
Inside any expression—task arguments, branch conditions, timeouts, etc.—reference a variable through $ENVS.<NAME>:
{
"refName": "upload-public-asset",
"arguments": {
"bucket": "${ $ENVS.PUBLIC_BUCKET }",
"region": "${ $ENVS.DEFAULT_REGION }",
"visibility": "public"
}
}
$ENVS is available everywhere expressions are evaluated, so you can also combine it with expression functions:
Behaviour and guarantees
Immutability
Values are read-only inside the workflow—expressions may consume but not modify them.
Scope
Accessible from any expression in any state of the workflow.
Type
All values are injected as strings; cast or parse as needed in your expressions.
Validation
If the runtime cannot supply a value for every listed variable, it MUST fail the workflow start-up.
Tip: Use
envsfor regular configuration and reservesecretsfor credentials and other sensitive data.
Last updated