Created
March 23, 2017 10:06
-
-
Save zregvart/4881a9692b0b661d98be7dd5181f374c to your computer and use it in GitHub Desktop.
Jenkins jobs that have not succeeded in the last 10 builds
This file contains hidden or 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
import jenkins.branch.MultiBranchProject | |
Jenkins.instance.items.findAll { job -> | |
if (job instanceof MultiBranchProject) { | |
return false | |
} else { | |
!job.builds.take(10).any { build -> | |
build.result == Result.SUCCESS | |
} | |
} | |
}.each { println it.name } | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment