1

I use docker container as jenkins slave, and need to restart the container when the images are updated. Therefore I need to know the Jenkins remote API to control it.

Where can I find the complete control command in JSON request ?

Groovy script is not considered since the command line will be embedded into the script.

Some hints in answer Reconfigure and reboot a Hudson/Jenkins slave as part of a build , but it is not complete

curl -d "offlineMessage=&json=%7B%22offlineMessage%22%3A+%22%22%7D&Submit=Yes" http://JENKINS_HOST/computer/THE_NODE_TO_DISCONNECT/doDisconnect
Community
  • 1
  • 1
Larry Cai
  • 55,923
  • 34
  • 110
  • 156

1 Answers1

0

This is not answering the question but if you want to connect a node you can use:

curl -d "Submit=Yes" http://JENKINS/computer/NODE_NAME/launchSlaveAgent
Dan
  • 1,159
  • 13
  • 8