Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
[FIX JENKINS-47015] Windows Agent Installer should not try to update … (
Browse files Browse the repository at this point in the history
#17)

* [FIX JENKINS-47015] Windows Agent Installer should not try to update jenkins-slave.exe on Unix agents

* [FIX JENKINS-47015] Windows Agent Installer should not try to update jenkins-slave.exe on Unix agents

* [FIX JENKINS-47015] Windows Agent Installer should not try to update jenkins-slave.exe on Unix agents

* Update SlaveExeUpdater.java

* [FIX JENKINS-47015] Windows Agent Installer should not try to update jenkins-slave.exe on Unix agents

* Update SlaveExeUpdater.java

* Checking unix slave agent

Windows Agent Installer should not try to update jenkins-slave.exe on Unix agents

* [JENKINS-47015] - Fix typo
  • Loading branch information
ealvesss authored and oleg-nenashev committed Nov 3, 2017
1 parent 7a33991 commit cf7c888
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;


/**
* Overwrite <tt>jenkins-slave.exe</tt> by new copy.
*
Expand Down Expand Up @@ -49,10 +50,16 @@ public void onOnline(Computer c, final TaskListener listener) throws IOException

final SlaveComputer sc = (SlaveComputer) c;

final Boolean isUnix = sc.isUnix();
if (isUnix == null || isUnix) { // Do not try installing on disconnected or Unix machines
return;
}

// do this asynchronously so as not to block Jenkins from using the slave right away
MasterComputer.threadPoolForRemoting.submit(new Callable<Void>() {
public Void call() throws Exception {
try {

Channel ch = sc.getChannel();
Slave n = sc.getNode();
if (n==null || ch==null) return null; // defensive check
Expand Down

0 comments on commit cf7c888

Please sign in to comment.