After having updated Jenkins to the latest Long Term Service release (1.509.4) I wanted to ensure the Windows Slave Agents that we’ve got running were up to date. The Windows Slave agents had previously been installed using the Java Web Start process and then turned into Windows Service slave agents.
To reinstall the Slave Agents we had to do the following:
- Stop the ‘Jenkins Slave’ Windows service
- Launch a Command Prompt (ensuring its run as an Administrator)
- type the following (assuming your Slave Agent was installed at c:jenkins)
sc delete jenkinsslave-c__jenkins
- Browse to your Node definition on your Master Jenkins instance in a web browser (Jenkins -> Manage Jenkins -> Manage Nodes -> Node)
- Click the Java Web Start process & run it on your Slave machine
- Select the option to install as a Windows Service from the File menu.
The ‘magic sauce’ was finding the ‘sc delete’ command which allowed us to quickly upgrade all of our Windows Slaves.
Hope it helps you maintain your Jenkins instances.