Guest User

Untitled

a guest
Jul 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def busyExecutors = Jenkins.instance.computers
  2. .collect {
  3. c -> c.executors.findAll { it.isBusy() }
  4. }
  5. .flatten()
  6.  
  7.  
  8. busyExecutors.each { e ->
  9. if (e.getCurrentExecutable().getParent().getOwnerTask().getName() == "JobName") {
  10. e.doStop()
  11.  
  12. }
  13. }
Add Comment
Please, Sign In to add comment