From d1c93fb57354d5e0b176ac4501db1167f0af4549 Mon Sep 17 00:00:00 2001 From: Alexander Reelsen Date: Mon, 17 Aug 2015 11:43:47 +0200 Subject: [PATCH] Release: Remove aws-maven plugin/improve release docs In order to have consistent deploys across several repositories, we should deploy to sonatype first, then mirror those contents, and then upload to s3. This means, the aws wagon is not needed anymore. --- dev-tools/build_repositories.sh | 2 +- dev-tools/pom.xml | 14 -------------- .../prepare_release_create_release_version.py | 18 ++++++++++++++---- pom.xml | 14 -------------- rest-api-spec/pom.xml | 14 -------------- 5 files changed, 15 insertions(+), 47 deletions(-) diff --git a/dev-tools/build_repositories.sh b/dev-tools/build_repositories.sh index d00f6c2e2ad..eaf982dc4cb 100755 --- a/dev-tools/build_repositories.sh +++ b/dev-tools/build_repositories.sh @@ -158,7 +158,7 @@ mkdir -p $centosdir echo "RPM: Syncing repository for version $version into $centosdir" $s3cmd sync s3://$S3_BUCKET_SYNC_FROM/elasticsearch/$version/centos/ $centosdir -rpm=distribution/rpm/target/releases/signed/elasticsearch*.rpm +rpm=distribution/rpm/target/releases/elasticsearch*.rpm echo "RPM: Copying signed $rpm into $centosdir" cp $rpm $centosdir diff --git a/dev-tools/pom.xml b/dev-tools/pom.xml index b53889ee731..3f8ab95c153 100644 --- a/dev-tools/pom.xml +++ b/dev-tools/pom.xml @@ -35,13 +35,6 @@ - - - org.springframework.build - aws-maven - 5.0.0.RELEASE - - @@ -70,13 +63,6 @@ - - - aws-release - AWS Release Repository - ${elasticsearch.s3.repository} - - diff --git a/dev-tools/prepare_release_create_release_version.py b/dev-tools/prepare_release_create_release_version.py index 02146a31659..e46da1b3fbd 100644 --- a/dev-tools/prepare_release_create_release_version.py +++ b/dev-tools/prepare_release_create_release_version.py @@ -123,9 +123,19 @@ if __name__ == "__main__": print('*** Done removing snapshot version. DO NOT COMMIT THIS, WHEN CREATING A RELEASE CANDIDATE.') - shortHash = subprocess.check_output('git log --pretty=format:"%h" -n 1', shell=True) + shortHash = subprocess.check_output('git log --pretty=format:"%h" -n 1', shell=True).decode('utf-8') + localRepo = '/tmp/elasticsearch-%s-%s', % (release_version, shortHash) + localRepoElasticsearch = localRepo + '/org/elasticsearch' print('') print('*** To create a release candidate run: ') - 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'); + print(' mvn clean install deploy -Prelease -DskipTests -Dgpg.keyname="D88E42B4" -Dpackaging.rpm.rpmbuild=/usr/bin/rpmbuild -Drpm.sign=true -Dmaven.repo.local=%s -Dno.commit.pattern="\\bno(n|)commit\\b" -Dforbidden.test.signatures=""' % (localRepo)) + print(' 1. Remove all _remote.repositories: find %s -name _remote.repositories -exec rm {} \;' % (localRepoElasticsearch)) + print(' 2. Rename all maven metadata files: for i in $(find %s -name "maven-metadata-local.xml*") ; do mv "$i" "${i/-local/}" ; done' % (localRepoElasticsearch)) + print(' 3. Sync %s into S3 bucket' % (localRepoElasticsearch)) + print (' s3cmd sync %s s3://download.elasticsearch.org/elasticsearch/staging/elasticsearch-%s-%s/maven/org/elasticsearch' % (localRepoElasticsearch, release_version, shortHash)) + print(' 4. Create repositories: ') + print (' export S3_BUCKET_SYNC_TO="download.elasticsearch.org/elasticsearch/staging/elasticsearch-%s-%s/repos"' % (release_version, shortHash)) + print (' export S3_BUCKET_SYNC_FROM="$S3_BUCKET_SYNC_TO"') + print(' dev-tools/build_repositories.sh %s' % (release_version)) + print('') + print('NOTE: the above mvn command will promt you several times for the GPG passphrase of the key you specified you can alternatively pass it via -Dgpg.passphrase=yourPassPhrase') diff --git a/pom.xml b/pom.xml index ee5bb0df3a9..47f6779ef46 100644 --- a/pom.xml +++ b/pom.xml @@ -1262,13 +1262,6 @@ org.eclipse.jdt.ui.text.custom_code_templates= - - - org.springframework.build - aws-maven - 5.0.0.RELEASE - - @@ -1316,13 +1309,6 @@ org.eclipse.jdt.ui.text.custom_code_templates= - - - aws-release - AWS Release Repository - ${elasticsearch.s3.repository} - - diff --git a/rest-api-spec/pom.xml b/rest-api-spec/pom.xml index 8129f05cf2c..3e4315cc83b 100644 --- a/rest-api-spec/pom.xml +++ b/rest-api-spec/pom.xml @@ -35,13 +35,6 @@ - - - org.springframework.build - aws-maven - 5.0.0.RELEASE - - @@ -70,13 +63,6 @@ - - - aws-release - AWS Release Repository - ${elasticsearch.s3.repository} - -