Hi,
I’m looking for a way to throw an expectation or console message from one job (declarative pipeline) to another running job,
A bit more details about my task,
I have a pipeline that given a certain condition, should abort an older build, I did it by
build.finish(hudson.model.Result.ABORTED, new java.io.IOException("Bla bla bla..."))
But then I found out that the finish()
action ABORT the job but the thread started by the build is still running (I can see it on the node-page on jenkins UI + the process list on the node),
I guess I can try searching for all running threads on all nodes and kill the relevant but didn’t find something I can play with,
In addition, since I have the build I prefer to avoid a wide search on all nodes/running-thread,
So I decided to use build.doKill()
but I need to make sure the user will know about the kill cause, and I thought about throwing an expectation or console message,
any idea?