Skip to content

Instantly share code, notes, and snippets.

@marcosborges
Created March 20, 2020 00:21
Show Gist options
  • Save marcosborges/f67d93744878c6b28cc8ce8ee3f7f726 to your computer and use it in GitHub Desktop.
Save marcosborges/f67d93744878c6b28cc8ce8ee3f7f726 to your computer and use it in GitHub Desktop.
Jenkins.getInstance().getAllItems().each {
if(it?.getDescriptor().getDisplayName() == "Pipeline") {
if (
it.getFullName().contains('JOB_NAME')
){
println "Deleting... ${it.getFullName()}"
it.delete()
}
}
}
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment