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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -