Skip to content
Permalink
Browse files
[FIXED JENKINS-34674] - Allow defining custom default update site IDs…
… via system properties
  • Loading branch information
oleg-nenashev committed May 8, 2016
1 parent 5d1f81c commit 3431a817c568b4568948eafc731c90f496874f77
Showing with 4 additions and 3 deletions.
  1. +3 −2 core/src/main/java/hudson/model/UpdateCenter.java
  2. +1 −1 war/src/main/js/pluginSetupWizardGui.js
@@ -143,9 +143,10 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas

/**
* {@linkplain UpdateSite#getId() ID} of the default update site.
* @since 1.483
* @since 1.483 - public property
* @since TODO - configurable via system property
*/
public static final String ID_DEFAULT = "default";
public static final String ID_DEFAULT = System.getProperty(UpdateCenter.class.getName()+".defaultUpdateSiteId", "default");

@Restricted(NoExternalUse.class)
public static final String ID_UPLOAD = "_upload";
@@ -894,7 +894,7 @@ var createPluginSetupWizard = function(appendTarget) {
jenkins.testConnectivity(siteId, handleGenericError(function(isConnected, isFatal, errorMessage) {
if(!isConnected) {
if (isFatal) { // We cannot continue, show error
setPanel(errorPanel, { errorMessage: 'Default update site connectivity check failed with fatal error: ' + errorMessage + '. Please create a bug in Jenkins JIRA.' });
setPanel(errorPanel, { errorMessage: 'Default update site connectivity check failed with fatal error: ' + errorMessage + '. If you see this issue for the custom Jenkins WAR bundle, consider setting the correct value of the hudson.model.UpdateCenter.defaultUpdateSiteId system property (requires Jenkins restart). Otherwise please create a bug in Jenkins JIRA.' });
} else { // The update center is offline, no problem
setPanel(offlinePanel);
}

0 comments on commit 3431a81

Please sign in to comment.