-
-
Save utopius/7648f0544bbd12d2f49befd9ee956229 to your computer and use it in GitHub Desktop.
Jenkins disable jobs
This file contains 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.instance.items.findAll {job-> | |
job.name.startsWith('<prefix-of-the-jobs>')//add the starting string - name of the job | |
}.each { | |
item -> | |
if (item.disabled == false) { | |
println item.name | |
item.disabled=true | |
item.save() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment