docker-buildkite-plugin icon indicating copy to clipboard operation
docker-buildkite-plugin copied to clipboard

propagate-environment: true should be the default

Open frankh opened this issue 3 years ago • 3 comments

I don't think I've made a single pipeline step using the docker plugin that doesn't use propagate-environment: true

Is there a good reason the default is not to propagate this?

I suppose this would have to be the 4.0 release as it would break some pipelines but I think it would be worth the change

frankh avatar Jul 23 '20 15:07 frankh

I agree!

lox avatar Jul 24 '20 02:07 lox

I agree as well. 🤔 @frankh do you have specific examples for why it would break existing pipelines if we change this default in a minor release?

ngan avatar Oct 03 '20 22:10 ngan

It's technically possible to have a pipeline that relies on the lack of an environment variable (e.g. some tools have different behaviour if CI=true is set or not)

Some people may be relying on this behaviour and it would break if it changes, but I imagine it would be quite rare

frankh avatar Oct 06 '20 10:10 frankh

There may also be security considerations. For example, cloud access credentials or tokens that you probably don't want to share by default. While I understand that your use case does lead to a lot of repetition, changing it will probably have those that don't need it create the very same issue with the opposite suggestion.

I believe the current default leads to the least amount of surprises in the long run and makes it quite obvious when information is being shared into the container.

toote avatar Sep 20 '22 17:09 toote