Last active
July 10, 2019 16:01
-
-
Save clalancette/deb31bfb1a4b07412d34e2a81ef9eced to your computer and use it in GitHub Desktop.
groovy script to disable indigo 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
import hudson.model.Cause | |
count = 0 | |
for (p in Jenkins.instance.allItems) { | |
if ( | |
( | |
p.name.startsWith("indigo_") || | |
p.name.startsWith("Isrc_") || | |
p.name.startsWith("Ibin_") || | |
p.name.startsWith("Idev_") || | |
p.name.startsWith("Idoc_") || | |
p.name.startsWith("Irel_") || | |
p.name.startsWith("Ipr_") | |
) && | |
p.isBuildable()) | |
{ | |
println(p.name) | |
count += 1 | |
p.disable() | |
} | |
if (count == 100) { | |
break | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment