Skip to content

Instantly share code, notes, and snippets.

@drnic
Last active March 5, 2020 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/a042bd719ed9213c5af7fd1605f8bf93 to your computer and use it in GitHub Desktop.
Save drnic/a042bd719ed9213c5af7fd1605f8bf93 to your computer and use it in GitHub Desktop.
git clone https://gist.github.com/drnic/a042bd719ed9213c5af7fd1605f8bf93 ~/workspace/pipeline.bk-run-docker-fail
cd ~/workspace/pipeline.bk-run-docker-fail

bk run pipeline.bk-run-docker-fail.yml -E AGENT_ENV=where-is-this-env

The output should include the two lines:

STEP_ENV=found-step-env
AGENT_ENV=where-is-this-env

But it only includes the first one:

STEP_ENV=found-step-env

Why does bk local run -E AGENT_ENV=xyz not pass $AGENT_ENV into the docker plugin env?

steps:
- label: ":docker:"
env:
STEP_ENV: found-step-env
commands:
- env | grep STEP_ENV
- env | grep AGENT_ENV
plugins:
- docker#v3.5.0:
image: "alpine:latest"
propagate-environment: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment