8000 chore: update mainline-1.x cd by josecorella · Pull Request #413 · aws/aws-encryption-sdk-java · GitHub
[go: up one dir, main page]

Skip to content
8000

chore: update mainline-1.x cd #413

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 8 commits into from
Nov 12, 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
4 changes: 2 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
["@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}"
}],
],
"repositoryUrl": "https://github.com/aws/aws-encryption-sdk-java",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can get the latest release from Maven:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-encryption-sdk-java</artifactId>
<version>1.9.0</version>
<version>1.9.1</version>
</dependency>
```

Expand Down
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: "mainline-1.x"

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 @@ -38,4 +38,3 @@ phases:
-Dsonatype.password="$SONA_PASSWORD" \
--no-transfer-progress \
-s $SETTINGS_FILE
- ./look_4_version.sh $VERSION
16 changes: 12 additions & 4 deletions codebuild/release/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,18 @@ batch:
- version
buildspec: codebuild/release/release-prod.yml

# Wait for artifacts to be available
- identifier: availability
depend-on:
- version
buildspec: codebuild/release/artifact-hunt.yml
env:
image: aws/codebuild/standard:5.0

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

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

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

- identifier: validate_prod_release_corretto11
depend-on:
- publish
- availability
buildspec: codebuild/release/validate-prod.yml
env:
variables:
Expand Down
15 changes: 10 additions & 5 deletions codebuild/release/upload_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ version: 0.2

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

phases:
pre_build:
commands:
- git checkout $BRANCH
# get new project version
- export VERSION=$(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')
- git config --global user.name "aws-crypto-tools-ci-bot"
- git config --global user.email "no-reply@noemail.local"
- echo $GH_TOKEN > token.txt
- export GH_TOKEN=
# install gh cli in order to upload artifacts
- curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
- 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
- apt update
- apt install gh
- git checkout $BRANCH
build:
commands:
- gh version
- gh auth login --with-token < $GH_TOKEN
- gh auth login --with-token < token.txt
- gh auth status
- |
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get \
-DrepoUrl=https://aws.oss.sonatype.org \
Expand All @@ -37,4 +42,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,5 +26,5 @@ phases:
- git checkout $BRANCH
build:
commands:
- npx semantic-release --branches $BRANCH --no-ci
- npx semantic-release --branches $BRANCH --no-ci

0