Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def busyExecutors = Jenkins.instance.computers
- .collect {
- c -> c.executors.findAll { it.isBusy() }
- }
- .flatten()
- busyExecutors.each { e ->
- if (e.getCurrentExecutable().getParent().getOwnerTask().getName() == "JobName") {
- e.doStop()
- }
- }
Add Comment
Please, Sign In to add comment