Created
April 17, 2018 07:18
-
-
Save andrewleo/db021141ab1ab015f038acbf7c1ffdc1 to your computer and use it in GitHub Desktop.
deleteJenkinsJob.groovy
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
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /20180410/ | |
} | |
matchedJobs.each { job -> | |
println job.name | |
//job.delete() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment