Jenkins: mark node as offline gets 403 Forbidden -
maybe it's dumb way so, i'm trying figure out best one. using jenkinsapi python, i'm running job on specific node using
job.invoke("jobtoken",false,false,3,5,{"node": node_name}).
the job trying mark node temporary offline. job runs specified in build -> execute shell -> command in job configuration screen.
using
wget "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down"
i 403 forbidden error on console output.
using
curl "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down"
i html response saying "authentication required". (on console output well).
question how mark node offline, within job.
thanks.
i think have add username , password
curl -x post "http://jenkins/computer/${node}/toggleoffline?offlinemessage=taken_down" --user username:password
i saw at: how can jenkins user authentication details "passed" script uses jenkins api create jobs?
Comments
Post a Comment