Created
February 12, 2020 15:39
-
-
Save Phoenix616/3739932742f4ab408767dddb9f476f04 to your computer and use it in GitHub Desktop.
This is a small groovy script to be used in Jenkins' Groovy console to change all jobs to block when upstream jobs build. (Or any other property)
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
for(item in Jenkins.instance.items) { | |
println("job $item.name") | |
if (item.hasProperty("blockBuildWhenUpstreamBuilding")) { | |
item.blockBuildWhenUpstreamBuilding = true | |
println("set to $item.blockBuildWhenUpstreamBuilding") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment