提交 83e0fbf0 编写于 作者: K Keith Zantow 提交者: Daniel Beck

[FIXED JENKINS-34882] Honor non-default update sites in setup wizard (#2469)

* [FIXED JENKINS-34882] Honor non-default update sites during install

* Fix pluginSetupWizard tests

* Fix lint
上级 eeadf3a8
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler">
<script type="text/javascript">
<j:getStatic var="defaultUpdateSiteId" className="hudson.model.UpdateCenter" field="ID_DEFAULT"/>
var defaultUpdateSiteId = '${defaultUpdateSiteId ? defaultUpdateSiteId.replace("'", "") : "default"}';
var setupWizardExtensions = [];
var onSetupWizardInitialized = function(extension) {
setupWizardExtensions.push(extension);
......
......@@ -1030,10 +1030,9 @@ var createPluginSetupWizard = function(appendTarget) {
}
var showInitialSetupWizard = function() {
// check for connectivity
//TODO: make the Update Center ID configurable
var siteId = 'default';
jenkins.testConnectivity(siteId, handleGenericError(function(isConnected, isFatal, errorMessage) {
// check for connectivity to the configured default update site
/* globals defaultUpdateSiteId: true */
jenkins.testConnectivity(defaultUpdateSiteId, 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 + '. 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.' });
......
......@@ -9,6 +9,9 @@ var getJQuery = function() {
return $;
};
/* globals defaultUpdateSiteId: true */
defaultUpdateSiteId = 'default';
// Iterates through all responses until the end and returns the last response repeatedly
var LastResponse = function(responses) {
var counter = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册