On 06.06.2014, at 22:26, scott crook <[email protected]> wrote: > Is there a configuration setting in Jenkins that I could just point it at the > U Oregon mirror directly? I have looked but I don't see a setting that is > obvious. Maybe there's something in a config XML file on the hard drive?
The download URLs are provided in the configured update center URL (e.g. http://updates.jenkins-ci.org/update-center.json ). They get stored on disk in the 'updates' folder. Since the UC metadata points you to update.jenkins-ci.org, which redirects to one of the mirrors, you'll need to replace those URLs. You have quite a few options I can think of: ---- Option 1: If you're behind a proxy, you might be able to configure it to automatically redirect your requests to a specific mirror whenever you're trying to access a URL of the form http://updates.jenkins-ci.org/updates/... ---- Option 2: Provide your own update center (e.g. using a rewriting proxy, or a periodic download job that edits the file afterwards and makes it available via HTTP) and change the metadata to point to a specific mirror. Setting the undocumented system property hudson.model.DownloadService.noSignatureCheck to 'true' will help as the update center metadata is digitally signed, and failed checks prevent use of the data. Changing the update center URL is probably easiest with the UpdateSites Manager Plugin. ---- Option 3: Rewrite the contents of the cached metadata files in JENKINS_HOME/updates (e.g. default.json). Jenkins should immediately pick up these changes, as it always checks the modification time of the file on disk. ---- Option 4: Run your own UC metadata update process within Jenkins, e.g. by running the following in Script Console (or as System Groovy build step, or in Scriptler, ...): == def originalurl = 'http://updates.jenkins-ci.org/download/' def mirroredurl = 'http://jenkins.mirror.isppower.de/' // change to whatever works for you def ucUrl = new URL('http://updates.jenkins-ci.org/update-center.json') // loadJSON is not considered public API def json = hudson.model.DownloadService.loadJSON(ucUrl).replace(originalurl, mirroredurl) def site = Jenkins.instance.updateCenter.getById('default') // updateData is not public API either; false means don't verify the signature def result = site.updateData(json, false) == As you can see, this uses a lot of private API, so it might break in any Jenkins update. Also, the regular update process is unchanged, so whenever it runs (which should only happen when manually triggered from Manage Plugin ยป Advanced if you schedule this script for periodic execution), the URLs are set back to the original values. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" 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.
