Skip to content

Commit dfefa62

Browse files
authored
chore: update mainline-1.x cd (#413)
1 parent cf2c873 commit dfefa62

File tree

7 files changed

+46
-14
lines changed

7 files changed

+46
-14
lines changed

.releaserc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
["@semantic-release/exec", {
5454
"prepareCmd": "mvn versions:set -DnewVersion=${nextRelease.version} \
5555
-DautoVersionSubmodules=true && find README.md -type f \
56-
-exec sed -i '' 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
56+
-exec sed -i 's/<version>.*<\\/version>/<version>${nextRelease.version}<\\/version>/g' {} \\;"
5757
}],
5858
["@semantic-release/git", {
5959
"assets": ["./CHANGELOG.md", "./pom.xml", "./README.md"],
60-
"message": "AWS Encryption SDK ${nextRelease.version} Release \n\n${nextRelease.notes}"
60+
"message": "AWS Encryption SDK ${nextRelease.version} Release -- $(date +%Y-%m-%d) \n\n${nextRelease.notes}"
6161
}],
6262
],
6363
"repositoryUrl": "https://github.com/aws/aws-encryption-sdk-java",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can get the latest release from Maven:
5656
<dependency>
5757
<groupId>com.amazonaws</groupId>
5858
<artifactId>aws-encryption-sdk-java</artifactId>
59-
<version>1.9.0</version>
59+
<version>1.9.1</version>
6060
</dependency>
6161
```
6262

codebuild/release/artifact-hunt.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
version: 0.2
5+
6+
env:
7+
variables:
8+
BRANCH: "mainline-1.x"
9+
10+
phases:
11+
install:
12+
runtime-versions:
13+
java: corretto11
14+
pre_build:
15+
commands:
16+
- git checkout $BRANCH
17+
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
18+
build:
19+
commands:
20+
- ./look_4_version.sh $VERSION

codebuild/release/release-prod.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ phases:
3838
-Dsonatype.password="$SONA_PASSWORD" \
3939
--no-transfer-progress \
4040
-s $SETTINGS_FILE
41-
- ./look_4_version.sh $VERSION

codebuild/release/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,18 @@ batch:
7070
- version
7171
buildspec: codebuild/release/release-prod.yml
7272

73+
# Wait for artifacts to be available
74+
- identifier: availability
75+
depend-on:
76+
- version
77+
buildspec: codebuild/release/artifact-hunt.yml
78+
env:
79+
image: aws/codebuild/standard:5.0
80+
7381
# Validate Maven Central with supported JDK and Corretto
7482
- identifier: validate_prod_release_openjdk8
7583
depend-on:
76-
- publish
84+
- availability
7785
buildspec: codebuild/release/validate-prod.yml
7886
env:
7987
variables:
@@ -83,7 +91,7 @@ batch:
8391

8492
- identifier: validate_prod_release_openjdk11
8593
depend-on:
86-
- publish
94+
- availability
8795
buildspec: codebuild/release/validate-prod.yml
8896
env:
8997
variables:
@@ -93,7 +101,7 @@ batch:
93101

94102
- identifier: validate_prod_release_corretto8
95103
depend-on:
96-
- publish
104+
- availability
97105
buildspec: codebuild/release/validate-prod.yml
98106
env:
99107
variables:
@@ -103,7 +111,7 @@ batch:
103111

104112
- identifier: validate_prod_release_corretto11
105113
depend-on:
106-
- publish
114+
- availability
107115
buildspec: codebuild/release/validate-prod.yml
108116
env:
109117
variables:

codebuild/release/upload_artifacts.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ version: 0.2
55

66
env:
77
variables:
8-
BRANCH: "mainline-1.x"
8+
BRANCH: "master"
99
git-credential-helper: yes
1010
secrets-manager:
11-
GH_TOKEN: Github/aws-crypto-tools-ci-bot:personal\ access\ token
11+
GH_TOKEN: Github/aws-crypto-tools-ci-bot:ESDK Release Token
1212

1313
phases:
1414
pre_build:
1515
commands:
16-
- git checkout $BRANCH
1716
# get new project version
1817
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
18+
- git config --global user.name "aws-crypto-tools-ci-bot"
19+
- git config --global user.email "[email protected]"
20+
- echo $GH_TOKEN > token.txt
21+
- export GH_TOKEN=
1922
# install gh cli in order to upload artifacts
2023
- curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
2124
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
2225
- apt update
2326
- apt install gh
27+
- git checkout $BRANCH
2428
build:
2529
commands:
2630
- gh version
27-
- gh auth login --with-token < $GH_TOKEN
31+
- gh auth login --with-token < token.txt
32+
- gh auth status
2833
- |
2934
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
3035
-DrepoUrl=https://aws.oss.sonatype.org \
@@ -37,4 +42,4 @@ phases:
3742
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
3843
-DrepoUrl=https://aws.oss.sonatype.org \
3944
-Dartifact=com.amazonaws:aws-encryption-sdk-java:${VERSION}:jar:javadoc
40-
- gh release upload v${VERSION} ~/.m2/repository/com/amazonaws/aws-encryption-sdk-java/${VERSION}/*.jar
45+
- 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)"

codebuild/release/version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ phases:
2626
- git checkout $BRANCH
2727
build:
2828
commands:
29-
- npx semantic-release --branches $BRANCH --no-ci
29+
- npx semantic-release --branches $BRANCH --no-ci
3030

0 commit comments

Comments
 (0)