Skip to content

Instantly share code, notes, and snippets.

@ehartmann
Created November 27, 2014 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehartmann/a7458c8bbf302f76802d to your computer and use it in GitHub Desktop.
Save ehartmann/a7458c8bbf302f76802d to your computer and use it in GitHub Desktop.
Disable jenkins jobs
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /.*/
}
matchedJobs.each { job ->
job.disable()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment