|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

The following would be a rough outline of a script to run in Script Console that adds an Additional Credential (by copying the first location's credential) to all projects with known externals:
Jenkins.instance.getAllItems(AbstractProject).each { p -> if (p.scm instanceof hudson.scm.SubversionSCM) { if (p.scm.locations.size() < p.scm.getProjectLocations(p).size()) { // known externals println p.fullDisplayName if (p.scm.locations.size() == 0) { println "... no configured locations!?" return } def auth = p.scm.locations[0].@credentialsId if (auth == null) { println "... no auth for first location" return } if (p.scm.@additionalCredentials == null) { p.scm.@additionalCredentials = [] } [email protected](new hudson.scm.SubversionSCM.AdditionalCredentials('<https://svnserver:443> Subversion Authentication', auth)) println "... adding additional credential" p.save() } } } return