Last active
October 26, 2020 15:03
-
-
Save queil/e4c1c9a4108b05a27f12be24c2c79c83 to your computer and use it in GitHub Desktop.
Jenkins: kill all jobs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkins.instance.getAllItems(AbstractItem.class) | |
.findAll {job -> job.fullName.matches("your-job-regex")} | |
.each { job -> job.getLastBuild().doKill() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment