Skip to content

Instantly share code, notes, and snippets.

@andrewleo
Created April 17, 2018 07:18
Show Gist options
  • Save andrewleo/db021141ab1ab015f038acbf7c1ffdc1 to your computer and use it in GitHub Desktop.
Save andrewleo/db021141ab1ab015f038acbf7c1ffdc1 to your computer and use it in GitHub Desktop.
deleteJenkinsJob.groovy
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