mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
merged back the RC branch
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30703 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
57a59c535e
commit
617af7ded3
48 files changed
+68
-23
No files matched your search
@@ -307,6 +307,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
|
||||
* Loads the data from the disk into this object.
|
||||
*/
|
||||
public synchronized void load() throws IOException {
|
||||
UpdateSite defaultSite = new UpdateSite("default", config.getUpdateCenterUrl() + "update-center.json");
|
||||
XmlFile file = getConfigFile();
|
||||
if(file.exists()) {
|
||||
try {
|
||||
@@ -314,11 +315,19 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.WARNING, "Failed to load "+file, e);
|
||||
}
|
||||
for (UpdateSite site : sites) {
|
||||
// replace the legacy site with the new site
|
||||
if (site.isLegacyDefault()) {
|
||||
sites.remove(site);
|
||||
sites.add(defaultSite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// If there aren't already any UpdateSources, add the default one.
|
||||
if (sites.isEmpty()) {
|
||||
// If there aren't already any UpdateSources, add the default one.
|
||||
// to maintain compatibility with existing UpdateCenterConfiguration, create the default one as specified by UpdateCenterConfiguration
|
||||
sites.add(new UpdateSite("default",config.getUpdateCenterUrl()+"update-center.json"));
|
||||
sites.add(defaultSite);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,7 +576,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
|
||||
* Absolute URL that ends with '/'.
|
||||
*/
|
||||
public String getUpdateCenterUrl() {
|
||||
return "http://hudson-ci.org/";
|
||||
return "http://updates.hudson-labs.org/";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -335,6 +335,13 @@ public class UpdateSite {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this the legacy default update center site?
|
||||
*/
|
||||
public boolean isLegacyDefault() {
|
||||
return id.equals("default") && url.startsWith("http://hudson-ci.org/");
|
||||
}
|
||||
|
||||
/**
|
||||
* In-memory representation of the update center data.
|
||||
*/
|
||||
|
||||
@@ -100,7 +100,7 @@ public class CommandLauncher extends ComputerLauncher {
|
||||
|
||||
{// system defined variables
|
||||
String rootUrl = Hudson.getInstance().getRootUrl();
|
||||
if (rootUrl != null) {
|
||||
if (rootUrl!=null) {
|
||||
pb.environment().put("HUDSON_URL", rootUrl);
|
||||
pb.environment().put("SLAVEJAR_URL", rootUrl+"/jnlpJars/slave.jar");
|
||||
}
|
||||
|
||||
@@ -331,6 +331,7 @@ public class Mailer extends Notifier {
|
||||
}
|
||||
|
||||
public String getSmtpAuthPassword() {
|
||||
if (smtpAuthPassword==null) return null;
|
||||
return Secret.toString(smtpAuthPassword);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user