Created
April 17, 2015 04:14
-
-
Save OdaShinsuke/58ceff3cdd49640cb7cf to your computer and use it in GitHub Desktop.
Jenkins のスクリプトコンソールで、Job の JDK を一括変換
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
jobs = jenkins.model.Jenkins.instance.items | |
oldJDK = jenkins.model.Jenkins.instance.getJDK("JavaSE 8u40") | |
newJDK = jenkins.model.Jenkins.instance.getJDK("JavaSE 8u45") | |
jobs.each { | |
if (it.JDK == oldJDK) { | |
it.JDK = newJDK | |
it.save() | |
println "updated ${it.name}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment