Skip to content

Instantly share code, notes, and snippets.

@tzinsky
Created January 9, 2024 16:09
Show Gist options
  • Select an option

  • Save tzinsky/7aa37d282c5e1c894d38b6ff27910d8c to your computer and use it in GitHub Desktop.

Select an option

Save tzinsky/7aa37d282c5e1c894d38b6ff27910d8c to your computer and use it in GitHub Desktop.
Groovy code to disable all Jenkins Jobs
jenkins = Hudson.instance
jenkins.instance.getView("<insert view name here>").items.each { item ->
println "\nJob: $item.name"
item.disabled = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment