Skip to content

Commit

Permalink
[JENKINS-33212] env not set when running docker exec
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeloof committed Feb 29, 2016
1 parent 838b8f8 commit 6bdc638
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -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");
Expand Down

0 comments on commit 6bdc638

Please sign in to comment.