Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 397 forks source link

image-build-args doesn't support pass-through envvar propagation #803

Open omnilinguist opened 6 years ago

omnilinguist commented 6 years ago

in #772, image-build-args was implemented, but the way it is implemented it wasn't clear how to make it work for pass-through envvars. to better explain this, in docker-compose's environment:, one can do either - BUILD_TIME_ARG=build-time-argument-value or simply just - BUILD_TIME_ARG, with the idea that it would be filled in from $BUILD_TIME_ARG from the environment where docker-compose is being called.

as discussed with @bacongobbler, this doesn't seem to be working for filling the envvars from wheredraft up is being called, thus resulting in a regression from docker-compose.

if draft.toml supported envvar injection, it may be possible to do something like image-build-args = { BUILD_TIME_ARG = "$BUILD_TIME_ARG", HTTP_PROXY = "$HTTP_PROXY" } as a workaround, but this is an implementation detail that is probably better left to the draft project owners to sort out.

ghost commented 5 years ago

Also related to this would be the inclusion of support for loading said env vars from a .env file