Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete all Jenkins jobs produced by "Build Per Branch"
for(job in jenkins.model.Jenkins.theInstance.getProjects()) {
if (job.name != 'project-test-master' && job.name.indexOf('project-test') > -1) {
job.delete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.