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 1 commit
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
3 changes: 1 addition & 2 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}"
}],
#@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
1 change: 0 additions & 1 deletion codebuild/release/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,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'}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this in our CodeBuild image? My Mac doesn't like this date invocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on an Ubuntu instance but not our specific codebuild image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on macOs and on Ubuntu $(date +%Y-%m-%d). Updating

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