With this week's release, we deliver a couple of useful updates to Environment Variables that will help you faster debug execution problems and configure pipelines.
Environment Variables in YAML
Until now, it wasn’t possible to define pipeline variables in YAML. Even though the whole pipeline configuration was stored in
buddy.yml, after parsing the YAML the user had to set the requested variables manually, which was taking a lot of time and could result in mistakes and typos in either names or values.
Now, you can put a property
variables for each pipeline or action, and then add the list of referring variables to it. For example:
variables: - key: "my_var" value: "my_value" settable: true description: "var description"
Check out our YAML documentation for more details on configuration as code.
Settable variables in the logs
From now on values of settable variables are produced in logs in order to help users debug execution problems.
Fetch repository and set environment variables
In addition to fetching a fresh clone of the repository before the execution, Buddy will also set environment variables and mark both actions in the log:
Fetching repo— here you'll find logs from the fetch, just as before
Setting environment variables— here you'll find the listed variables, each in a separate line, and in this format:
ENV=value(first we'll list variables defined by the user, then default ENV VARs)
If you change the value of any variable in a build action, then it will be listed at the very end of the action logs with the
Setting environment variables header:
Run next pipeline
If you're passing variables between pipelines, we'll
put them in the action logs with the
Passing environment variables header: