|
@@ -25,7 +25,6 @@ import org.apache.lucene.util.IOUtils;
|
|
|
import org.elasticsearch.Build;
|
|
|
import org.elasticsearch.Version;
|
|
|
import org.elasticsearch.bootstrap.JarHell;
|
|
|
-import org.elasticsearch.cli.Command;
|
|
|
import org.elasticsearch.cli.ExitCodes;
|
|
|
import org.elasticsearch.cli.SettingCommand;
|
|
|
import org.elasticsearch.cli.Terminal;
|
|
@@ -101,7 +100,7 @@ import static org.elasticsearch.common.util.set.Sets.newHashSet;
|
|
|
*/
|
|
|
class InstallPluginCommand extends SettingCommand {
|
|
|
|
|
|
- private static final String PROPERTY_SUPPORT_STAGING_URLS = "es.plugins.staging";
|
|
|
+ private static final String PROPERTY_STAGING_ID = "es.plugins.staging";
|
|
|
|
|
|
// TODO: make this a resource file generated by gradle
|
|
|
static final Set<String> MODULES = unmodifiableSet(newHashSet(
|
|
@@ -209,12 +208,13 @@ class InstallPluginCommand extends SettingCommand {
|
|
|
if (OFFICIAL_PLUGINS.contains(pluginId)) {
|
|
|
final String version = Version.CURRENT.toString();
|
|
|
final String url;
|
|
|
- if (System.getProperty(PROPERTY_SUPPORT_STAGING_URLS, "false").equals("true")) {
|
|
|
+ final String stagingHash = System.getProperty(PROPERTY_STAGING_ID);
|
|
|
+ if (stagingHash != null) {
|
|
|
url = String.format(
|
|
|
Locale.ROOT,
|
|
|
"https://download.elastic.co/elasticsearch/staging/%1$s-%2$s/org/elasticsearch/plugin/%3$s/%1$s/%3$s-%1$s.zip",
|
|
|
version,
|
|
|
- Build.CURRENT.shortHash(),
|
|
|
+ stagingHash,
|
|
|
pluginId);
|
|
|
} else {
|
|
|
url = String.format(
|