Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Fix Subversion plugin configuration in Jenkins in all jobs
// Modify SVN related in memory objects
for(item in Hudson.instance.items) {
def scm = item.scm
if((scm instanceof org.jenkinsci.plugins.multiplescms.MultiSCM) ) {
for(s in scm.scms) {
if( s instanceof hudson.scm.SubversionSCM) {
// Change updater
s.workspaceUpdater = new hudson.scm.subversion.UpdateUpdater()
// Turn fail on external on all locations
s.locations.each { it.externalFailOption = true ; println(it.dump()) }
// Now save all the jobs to make the change persistent
jobs = Hudson.instance.items.findAll{job ->}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.