Thanks for sharing this Silas. I went and checked the current and 12 historical versions of the getting started guide to get to the bottom of this. The circle.yml schema for the
environment: key hasn’t changed in the docs, so that goes back at least as far as the 2.0 alpha.
I think I see the problem, though.
environment subsection for
build, which as you stated, should be a YAML map, not a YAML list:
There’s also an
env section that’s passed to Docker images, which should be a YAML list and not a YAML map:
- image: postgres:9.4.1
# some containers require setting environment variables
I agree this is confusing. I think it’s the result of the first section getting passed straight to Docker–you’ll also notice the equals/colon difference. The
VAR=VALUE is likely passed into bash/sh in the Docker container.
So just to recap, there was no change in syntax around environment variables. There’s an inconsistent syntax between
env values passed to Docker and
environment values for CircleCI build steps.
Our engineers are aware of this, but I’ll bring this to their attention again. Additionally, I’ll update the documentation so that this is specifically called out.