Skip to content
Permalink
Browse files

[JENKINS-33212] env not set when running `docker exec`

  • Loading branch information...
ndeloof committed Feb 29, 2016
1 parent 838b8f8 commit 6bdc6385dd7887265170b23855bab676da32c859
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java
@@ -300,7 +300,10 @@ public EnvVars getEnv(String container, Launcher launcher) throws IOException, I
.add("env");

final ByteArrayOutputStream out = new ByteArrayOutputStream();
int status = launcher.launch().cmds(args).stdout(out).stderr(listener.getLogger()).join();
int status = launcher.launch()
.envs(getEnvVars())
.cmds(args)
.stdout(out).quiet(!verbose).stderr(listener.getLogger()).join();

if (status != 0) {
throw new RuntimeException("Failed to retrieve container's environment");

0 comments on commit 6bdc638

Please sign in to comment.
You can’t perform that action at this time.