Skip to content

chore: Update release process from release feedback #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@
["@semantic-release/exec", {
"prepareCmd": "mvn versions:set -DnewVersion=${nextRelease.version} \
-DautoVersionSubmodules=true && find README.md -type f \
-exec sed -i '' 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
-exec sed -i 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
}],
["@semantic-release/git", {
"assets": ["./CHANGELOG.md", "./pom.xml", "./README.md"],
"message": "AWS Encryption SDK ${nextRelease.version} Release \n\n${nextRelease.notes}"
"message": "AWS Encryption SDK ${nextRelease.version} Release -- $(date +%Y-%m-%d) \n\n${nextRelease.notes}"
}],
#@semantic-release/github"
],
"repositoryUrl": "https://github.com/aws/aws-encryption-sdk-java",
}
20 changes: 20 additions & 0 deletions codebuild/release/artifact-hunt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

version: 0.2

env:
variables:
BRANCH: "master"

phases:
install:
runtime-versions:
java: corretto11
pre_build:
commands:
- git checkout $BRANCH
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
build:
commands:
- ./look_4_version.sh $VERSION
4 changes: 1 addition & 3 deletions codebuild/release/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ env:
phases:
install:
runtime-versions:
java: openjdk11
java: corretto11
pre_build:
commands:
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
- export SETTINGS_FILE=$(pwd)/codebuild/release/settings.xml
- aws secretsmanager get-secret-value --region us-west-2 --secret-id Maven-GPG-Keys --query SecretBinary --output text | base64 -d > ~/mvn_gpg.tgz
- tar -xvf ~/mvn_gpg.tgz -C ~
Expand All @@ -35,4 +34,3 @@ phases:
-Dsonatype.password="$SONA_PASSWORD" \
--no-transfer-progress \
-s $SETTINGS_FILE
- ./look_4_version.sh $VERSION
14 changes: 10 additions & 4 deletions codebuild/release/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ batch:
- version
buildspec: codebuild/release/release-prod.yml

# Search for published Artifact
- identifier: artifact_hunt
depend-on:
- publish
buildspec: codebuild/release/artifact-hunt.yml

# Validate Maven Central with supported JDK and Corretto
- identifier: validate_prod_release_openjdk8
depend-on:
- publish
- artifact_hunt
buildspec: codebuild/release/validate-prod.yml
env:
variables:
Expand All @@ -83,7 +89,7 @@ batch:

- identifier: validate_prod_release_openjdk11
depend-on:
- publish
- artifact_hunt
buildspec: codebuild/release/validate-prod.yml
env:
variables:
Expand All @@ -93,7 +99,7 @@ batch:

- identifier: validate_prod_release_corretto8
depend-on:
- publish
- artifact_hunt
buildspec: codebuild/release/validate-prod.yml
env:
variables:
Expand All @@ -103,7 +109,7 @@ batch:

- identifier: validate_prod_release_corretto11
depend-on:
- publish
- artifact_hunt
buildspec: codebuild/release/validate-prod.yml
env:
variables:
Expand Down
2 changes: 1 addition & 1 deletion codebuild/release/upload_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ phases:
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
-DrepoUrl=https://aws.oss.sonatype.org \
-Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar:javadoc
- gh release upload v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar
- gh release create v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar -d -F CHANGELOG.md -t "AWS Encryption SDK ${VERSION} Release -- $(date +%Y-%m-%d)"
2 changes: 1 addition & 1 deletion codebuild/release/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ phases:
- git checkout $BRANCH
build:
commands:
- npx semantic-release --no-ci
- npx semantic-release --branches $BRANCH --no-ci