Variables can be templated into your bitbucket-pipelines.yaml file via a simple, standardized templating syntax. Currently, this supports system variables and user variables (such as repository and workspace variables). For more details, see the Variables and secrets | Bitbucket Cloud | Atlassian Support. Custom pipeline variables are not supported.
We’ve now added custom pipeline variables to the existing set of supported variables, giving you more flexibility to specify values on a per‑run, per‑pipeline basis. You can template these variables in your YAML file at configuration time.
How it works:
Templating variables in your .yaml file uses a simple, standardized syntax ${{MY_VARIABLE_KEY}}.
- Wrap the variable key in your .yaml with
${{ }} tags; the system handles the rest.
- In the Run pipeline dialog, you can provide values for these variables.
- The system then templates the values of these variables.
Read more information about this here: Variables and secrets help document.