Skip to content

Commit

Permalink
[FIXED JENKINS-34674] - Allow defining custom default update site IDs…
Browse files Browse the repository at this point in the history
… via system properties
  • Loading branch information
oleg-nenashev committed May 8, 2016
1 parent 5d1f81c commit 3431a81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/hudson/model/UpdateCenter.java
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/js/pluginSetupWizardGui.js
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3431a81

Please sign in to comment.