docker-compose-buildkite-plugin
docker-compose-buildkite-plugin copied to clipboard
Automatically propagate environment variables into the container
When setting pipeline environment variables it commonly catches me and other people in our company out that these variables are not shared with the container. We can specify them manually in the docker-compose file, but it would be nice if this was done automatically.
We've discussed doing this before. It's certainly something that comes up a fair bit, I regularly forget to pass through env.
The hard part is that there is no reliable way to figure out what environment to pass in, which would mean we'd have to pass in everything that was in the env. The danger there is that you would expose things like secrets to containerized software, which would surprise a lot of people.
Would you expect that all env that was set in things like hooks would make it through, or just thing set in the global pipeline environment section?
Just those set in the global and local pipeline environment sections. even if it were behind a flag, this would be very helpful
We will likely mirror the propagate-environment config from https://github.com/buildkite-plugins/docker-buildkite-plugin#propagate-environment-optional-boolean.
Having just seen the confusion not auto-propagating just caused with setting up junit annotations, I reckon we should add this option and set it on by default (and bump the version). Will make for a much smoother onboarding experience from other systems if you were expecting CI=true to be set, for example.
We're at 3.1.0 now are we able to add this to a future major version release?
/me logs on and checks the status…
huzzah!