Skip to content

Instantly share code, notes, and snippets.

@a-chernykh
Created November 20, 2014 23:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-chernykh/4728c7b57765dc41f81f to your computer and use it in GitHub Desktop.
Save a-chernykh/4728c7b57765dc41f81f to your computer and use it in GitHub Desktop.
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