Created
March 11, 2016 10:07
-
-
Save rodrigozrusso/185f2542f47a222f19be 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