Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-34392] Use forNode call again
  • Loading branch information
armfergom committed May 3, 2016
1 parent 35f6c80 commit 9814958
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/jenkinsci/plugins/MsTestBuilder.java
Expand Up @@ -7,8 +7,10 @@
import hudson.Launcher;
import hudson.Util;
import hudson.model.BuildListener;
import hudson.model.Computer;
import hudson.model.AbstractBuild;
import hudson.model.Descriptor;
import hudson.model.Node;
import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
Expand Down Expand Up @@ -112,6 +114,12 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
args.add(execName);
} else {
EnvVars env = build.getEnvironment(listener);
Node node = Computer.currentComputer().getNode();
if (node == null) {
listener.fatalError("Configuration has changed and node has been removed.");
return false;
}
installation = installation.forNode(node, listener);
installation = installation.forEnvironment(env);
String pathToMsTest = installation.getHome();
FilePath exec = new FilePath(launcher.getChannel(), pathToMsTest);
Expand Down

0 comments on commit 9814958

Please sign in to comment.