Skip to content
Permalink
Browse files

Merge pull request #39 from slide/master

Fix JENKINS-19222
  • Loading branch information...
gboissinot committed Feb 4, 2015
2 parents de93818 + 6338990 commit 4260b55f4cf0f89910fd61d0ae3a0cedbfeda3f5
@@ -4,6 +4,7 @@
import hudson.Util;
import hudson.matrix.MatrixRun;
import hudson.model.*;
import hudson.model.Hudson.MasterComputer;
import hudson.util.LogTaskListener;
import org.jenkinsci.lib.envinject.EnvInjectException;
import org.jenkinsci.lib.envinject.EnvInjectLogger;
@@ -40,9 +41,14 @@
//test if there is at least one executor
if (computer != null) {
result = computer.getEnvironment().overrideAll(result);
if(computer instanceof MasterComputer) {
result.put("NODE_NAME", "master");
} else {
result.put("NODE_NAME", computer.getName());
}

Node n = computer.getNode();
if (n != null) {
result.put("NODE_NAME", computer.getName());
result.put("NODE_LABELS", Util.join(n.getAssignedLabels(), " "));
}
}

0 comments on commit 4260b55

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