mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 23:25:52 +00:00
Merge branch 'master' into DownloadSettings-JENKINS-19081
This commit is contained in:
commit
db8d6508aa
221 files changed
+3447
-958
No files matched your search
@@ -689,13 +689,31 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
String n = en.nextElement();
|
||||
if(n.startsWith("plugin.")) {
|
||||
n = n.substring(7);
|
||||
if (n.indexOf(".") > 0) {
|
||||
String[] pluginInfo = n.split("\\.");
|
||||
UpdateSite.Plugin p = Jenkins.getInstance().getUpdateCenter().getById(pluginInfo[1]).getPlugin(pluginInfo[0]);
|
||||
if(p==null)
|
||||
throw new Failure("No such plugin: "+n);
|
||||
p.deploy(dynamicLoad);
|
||||
// JENKINS-22080 plugin names can contain '.' as could (according to rumour) update sites
|
||||
int index = n.indexOf('.');
|
||||
UpdateSite.Plugin p = null;
|
||||
while (index != -1) {
|
||||
if (index + 1 >= n.length()) {
|
||||
break;
|
||||
}
|
||||
String pluginName = n.substring(0, index);
|
||||
String siteName = n.substring(index + 1);
|
||||
UpdateSite updateSite = Jenkins.getInstance().getUpdateCenter().getById(siteName);
|
||||
if (siteName != null) {
|
||||
UpdateSite.Plugin plugin = updateSite.getPlugin(pluginName);
|
||||
if (plugin != null) {
|
||||
if (p != null) {
|
||||
throw new Failure("Ambiguous plugin: " + n);
|
||||
}
|
||||
p = plugin;
|
||||
}
|
||||
}
|
||||
index = n.indexOf('.', index + 1);
|
||||
}
|
||||
if (p == null) {
|
||||
throw new Failure("No such plugin: " + n);
|
||||
}
|
||||
p.deploy(dynamicLoad);
|
||||
}
|
||||
}
|
||||
rsp.sendRedirect("../updateCenter/");
|
||||
|
||||
Reference in new issue
Block a user