Created
March 20, 2020 00:21
-
-
Save marcosborges/f67d93744878c6b28cc8ce8ee3f7f726 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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