Skip to content

Commit

Permalink
[JENKINS-40780] Fix blocker bug when launched in a pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsirot committed Jan 3, 2017
1 parent 936d990 commit bd1b928
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -163,7 +163,7 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath ws, @Nonnull Launc
CLIRunner runner = new CLIRunner(run, ws, launcher, listener);
Computer computer = Computer.currentComputer();
if (computer == null) {
throw new AbortException("The ansible playbook build step requires to be launched on a node");
throw new AbortException("The ansible ad-hoc command build step requires to be launched on a node");
}
EnvVars envVars = run.getEnvironment(listener);
String exe = AnsibleInstallation.getExecutable(ansibleName, AnsibleCommand.ANSIBLE, computer.getNode(), listener, envVars);
Expand Down
Expand Up @@ -323,7 +323,6 @@ protected Void run() throws Exception {
builder.setHostKeyChecking(false);
builder.setUnbufferedOutput(true);
builder.setColorizedOutput(step.isColorized());
Computer computer = Computer.currentComputer();
Node node;
if (computer == null || (node = computer.getNode()) == null) {
throw new AbortException("The ansible playbook build step requires to be launched on a node");
Expand Down

0 comments on commit bd1b928

Please sign in to comment.