Improvements to Environment Variables (January 2019)
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:
jsonvariables: - key: "my_var" value: "my_value" settable: true description: "var description"
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 beforeSetting 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)
Image loading...
Build actions
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:
Image loading...
Run next pipeline
If you're passing variables between pipelines, we'll
put them in the action logs with the Passing environment variables
header:
Image loading...
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.