Last active
July 10, 2019 16:01
-
-
Save clalancette/a85db49094f3165083190dce5c851ba7 to your computer and use it in GitHub Desktop.
groovy script to delete indigo
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.delete() | |
} | |
if (count == 50) { | |
break | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment