Created
January 17, 2018 00:32
-
-
Save udyvish/c333719d59fa2ca23beeae440f010cc8 to your computer and use it in GitHub Desktop.
the below script kills all the jobs which are stuck
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.getItems().each { job -> | |
job.builds.each { build -> | |
if (build.getResult().equals(null)) { | |
build.finish(hudson.model.Result.ABORTED, new java.io.IOException("Aborting build")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment