Created
August 23, 2016 13:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to obtains slave secret key: https://support.cloudbees.com/hc/en-us/articles/222520647-How-to-find-slave-secret-key