campaigns: allow environment variables to be passed through from the environment
Created by: LawnGnome
Right now, the env block in campaign specs allows environment variables to be defined within the Docker container running the steps, but does not provide an easy way to pass values through from the environment, which means that secrets would need to be encoded in the spec.
I see a couple of obvious options here; I'd argue we should do both:
-
Add a templating function to pull in an arbitrary environment variable.
-
Allow a shorthand definition like
docker-composeallows when just passing values through; eg:env: - FOO - BARTo pass
FOOandBARdirectly into the container.
This also means that the spec isn't the sole source of truth, so we need to document accordingly, and potentially warn on missing environment variables.