Created
May 14, 2013 09:48
-
-
Save mdr/5574848 to your computer and use it in GitHub Desktop.
Update SVN URL in Jenkins
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
import hudson.scm.* | |
newURL = "https://mvld-dev1.hcuk.pri:18080/svn/dev/hccf/test_automation/functional/trunk/selenium-framework/hitachi-automation" | |
for (job in Hudson.instance.items) { | |
if (job.scm instanceof SubversionSCM) { | |
location = job.scm.locations[0] | |
println(location) | |
newLocation = new SubversionSCM.ModuleLocation(newURL, location.local) | |
newscm = new SubversionSCM([newLocation], job.scm.workspaceUpdater, job.scm.browser, | |
job.scm.excludedRegions, job.scm.excludedUsers, job.scm.excludedRevprop, job.scm.excludedCommitMessages, job.scm.includedRegions) | |
job.scm = newscm; | |
println("Updated SVN location for $job.name to $newURL") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment