Skip to content

Instantly share code, notes, and snippets.

View warandpeace's full-sized avatar

Andrew Ferguson warandpeace

View GitHub Profile
@nextrevision
nextrevision / deleteJenkinsJobs.groovy
Created December 3, 2015 17:30
Groovy script to delete all jenkins jobs that match a regex pattern
import jenkins.model.*
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /my_regex_here/
}
matchedJobs.each { job ->
println job.name
//job.delete()
}