Created
January 9, 2024 16:09
-
-
Save tzinsky/7aa37d282c5e1c894d38b6ff27910d8c to your computer and use it in GitHub Desktop.
Groovy code to disable all Jenkins Jobs
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 = 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