I've got a job that need to stop other running\pending jobs when its being run.
Is it possible to do automatically?
I've got a job that need to stop other running\pending jobs when its being run.
Is it possible to do automatically?
This is an old question, but I just spent a bunch of time looking for an answer, hopefully this will save someone time:
Use the jenkins http api to stop a build: wget http://your.jenkins.host/job/JOBNAME/lastBuild/stop
If you are using matrix permissions, make sure your Anonymous user has Read and Cancel permission on Jobs.
There is a plugin available to kill another job.
You can use this plugin :
https://wiki.jenkins-ci.org/display/JENKINS/Signal+killer
This plugin extends ProcessKiller extension point and sends signal (currentlly SIGKILL) to given job via native GNU C library call.