curl - How to stop an zombie job on Jenkins -
i have situation have 2 jobs. main 1st jenkins project trigger 2nd project using "trigger/call builds on other projects" plug-in. 2nd project kind of server starting first using trigger , main 1st project process on it. want stop 2nd zombie project once 1st project build done.
i have found reference below:-
how stop unstoppable zombie job on jenkins without restarting server?
but want stop zombie job automatically once main project build complete
i have found 1 way
how stop build in jenkins via rest api ?
i have tried hitting rest api of jenkins
http://localhost:8086/job/job_name/14/stop
but getting error below
> http error 403 > > problem accessing /job/testzap/14/stop. reason: > > no valid crumb included in request
i have hit curl command below :-
c:\users\shubham jain>curl -x post http://admin:252ec0f4ac@localhost:8086/job/testzap/build -h "crumb"
but getting error below:
error 403 no valid crumb included in request
http error 403
problem accessing /job/testzap/build. reason:
no valid crumb included in request
powered jetty:// 9.4.z-snapshot
is there way this?
//////////////////////////////////////////////////
at end have disabled csrf protection -> prevent cross site request forgery exploits after hitting url :- http://localhost:8086/job/testzap/15/stop
still getting response appears :-
post required post required hudson.model.abstractbuild.dostop
i disable disabled csrf protection -> prevent cross site request forgery exploits jenkins
Comments
Post a Comment