I want to accomplish, through a script using the Jenkins API, the equivalent of manually clicking on the \"Disconnect\" link on the node management page in Jenkins. I want t
I don't see anything in the pipeline-model-definition-plugin regarding node management.
So an alternative approach would be to call the disconnect action through the Jenkins API from the pipeline.
The Jenkins API for disconnect is:
http://[jenkins_url]:8080/computer/[slave_name]/doDisconnect?offlineMessage=bye
Making a Jenkins API call from a pipeline is done through the JENKINS HTTP Request Plugin:
def response = httpRequest "http://..."