Add elasticsearch version as a prefix for the staging URL
This is purely for maintainance reasons since it easier to see if we can drop certain stageing urls if we have the version next to the hash. I also removed the gpg passphrase from the example URL since it's better to get prompted?
This commit is contained in:
parent
59f390f5d0
commit
e7d075f6ae
|
@ -456,7 +456,7 @@ public class PluginManager {
|
|||
if (user == null) {
|
||||
// TODO Update to https
|
||||
if (!Strings.isNullOrEmpty(System.getProperty(PROPERTY_SUPPORT_STAGING_URLS))) {
|
||||
addUrl(urls, String.format(Locale.ROOT, "http://download.elastic.co/elasticsearch/staging/%s/org/elasticsearch/plugin/elasticsearch-%s/%s/elasticsearch-%s-%s.zip", Build.CURRENT.hashShort(), repo, version, repo, version));
|
||||
addUrl(urls, String.format(Locale.ROOT, "http://download.elastic.co/elasticsearch/staging/elasticsearch-%s-%s/org/elasticsearch/plugin/elasticsearch-%s/%s/elasticsearch-%s-%s.zip", version, Build.CURRENT.hashShort(), repo, version, repo, version));
|
||||
}
|
||||
addUrl(urls, String.format(Locale.ROOT, "http://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/elasticsearch-%s/%s/elasticsearch-%s-%s.zip", repo, version, repo, version));
|
||||
} else {
|
||||
|
|
|
@ -108,8 +108,8 @@ public class PluginManagerUnitTests extends ESTestCase {
|
|||
Iterator<URL> iterator = handle.urls().iterator();
|
||||
|
||||
if (supportStagingUrls) {
|
||||
String expectedStagingUrl = String.format(Locale.ROOT, "http://download.elastic.co/elasticsearch/staging/%s/org/elasticsearch/plugin/elasticsearch-%s/%s/elasticsearch-%s-%s.zip",
|
||||
Build.CURRENT.hashShort(), randomPluginName, Version.CURRENT.number(), randomPluginName, Version.CURRENT.number());
|
||||
String expectedStagingUrl = String.format(Locale.ROOT, "http://download.elastic.co/elasticsearch/staging/elasticsearch-%s-%s/org/elasticsearch/plugin/elasticsearch-%s/%s/elasticsearch-%s-%s.zip",
|
||||
Version.CURRENT.number(), Build.CURRENT.hashShort(), randomPluginName, Version.CURRENT.number(), randomPluginName, Version.CURRENT.number());
|
||||
assertThat(iterator.next(), is(new URL(expectedStagingUrl)));
|
||||
}
|
||||
|
||||
|
|
|
@ -142,4 +142,6 @@ if __name__ == "__main__":
|
|||
shortHash = subprocess.check_output('git log --pretty=format:"%h" -n 1', shell=True)
|
||||
print('')
|
||||
print('*** To create a release candidate run: ')
|
||||
print(' mvn clean deploy -Prelease -DskipTests -Dgpg.keyname="$GPG_KEY_ID" -Dgpg.passphrase="$GPG_PASSPHRASE" -Dpackaging.rpm.rpmbuild=/usr/bin/rpmbuild -Delasticsearch.s3.repository=s3://download.elasticsearch.org/elasticsearch/staging/%s' % (shortHash.decode('utf-8')))
|
||||
print(' mvn clean deploy -Prelease -DskipTests -Dgpg.keyname="D88E42B4" -Dpackaging.rpm.rpmbuild=/usr/bin/rpmbuild -Delasticsearch.s3.repository=s3://download.elasticsearch.org/elasticsearch/staging/elasticsearch-%s-%s' % (release_version, shortHash.decode('utf-8')))
|
||||
print('');
|
||||
print('NOTE: this command will promt you several times for the GPG passphrase of the key you specified you can alternatively pass it via -Dgpg.passphrase=yourPassPhrase');
|
||||
|
|
Loading…
Reference in New Issue