Last active
October 31, 2022 08:48
-
-
Save itsprdp/b79d7fd088916a26c99af1a9f9cf0bfd to your computer and use it in GitHub Desktop.
Groovy script to disable all jenkins jobs in a view
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("PS_Portal").items.each { job -> | |
println "\nJob: $job.name" | |
job.disabled = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment