How to find slave secret key?

Issue

I have got the jenkins-cli working and able to create a slave. How can I dynamically get the secret key to start up the slave? The launch method is via Java Web Start.

Environment

  • CloudBees Jenkins Enterprise
  • CLI

Resolution

If you want to find/use the slave secret you can query the script console remotely.

Example:

for (aSlave in hudson.model.Hudson.instance.slaves)
{ println aSlave.name + "," + aSlave.getComputer().getJnlpMac() }

then pass the value to -secret.

See also:

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.