-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
Using Jenkins with run:hpi with 1.642.3 with pipeline/workflow 2.1 though I'm pretty sure this is still an issue with the latest jenkins plugin running in normal mode.
So I want to delete a slave and abort any job that's running on it. One way that appears to work with freestyle projects is to iterate over the slaves executors and do an
ex.interrupt(Result.ABORTED, new CauseOfInterruption.UserInteruption("Killing job because we're removing this slave"))
before terminating the slave. What's nice is that you'd typically get a message in the build logs with the CauseOfInterruption and the job stops.
However with Pipelines it says "Aborted by anonymous" (or whatever user has perms to do this) with no cause, then it says "Click here to forcibly terminate running steps". The button works but I want the script (or in this case a plugin, but this is useful on the groovy console as well) to actually abort the job, not prompt me.