Skip to content

Instantly share code, notes, and snippets.

@rkettelerij
Created August 23, 2016 13:26
Show Gist options
  • Save rkettelerij/943492864bfc12f5220eb16d9ae62eaa to your computer and use it in GitHub Desktop.
Save rkettelerij/943492864bfc12f5220eb16d9ae62eaa to your computer and use it in GitHub Desktop.
Launch a Jenkins slave on a Windows node and authenticate against a Jenkins master
SET slaveName=<hostname of current server>
SET slaveSecret=<secret>
SET masterName=<hostname of Jenkins master node>
SET masterPort=8080
:: Download slave.jar
bitsadmin.exe /transfer "Downloading Jenkins slave.jar, please wait" http://%masterName%:%masterPort%/jnlpJars/slave.jar C:\slave.jar
:: Start slave
C:\java\bin\java.exe -Xmx4G -XX:MaxPermSize=256M -jar slave.jar -jnlpUrl http://%masterName%:%masterPort%/computer/%slaveName%/slave-agent.jnlp -secret %slaveSecret%
@rkettelerij
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment