Skip to content

Commit f222462

Browse files
authored
chore: update release process (#1888)
1 parent 9297e1b commit f222462

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

cfn/ci_cd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Resources:
9191
## If this value is 0, greater than 25, or not provided then the full history is downloaded with each build project.
9292
GitCloneDepth: 0
9393
GitSubmodulesConfig:
94-
FetchSubmodules: false
94+
FetchSubmodules: true
9595
InsecureSsl: false
9696
ReportBuildStatus: false
9797
Type: GITHUB

codebuild/ci/release-ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,21 @@ phases:
5858
--package $PACKAGE \
5959
--versions $VERSION_HASH \
6060
--region $REGION;
61-
61+
# Assume Role to access non-prod resources
62+
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-Role-us-west-2" --role-session-name "CB-TestVectorResources")
63+
- export TMP_ROLE
64+
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
65+
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
66+
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken')
67+
- aws sts get-caller-identity
6268
# See https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
6369
- echo "Setting version in POM to $VERSION_HASH"
6470
- mvn versions:set -DnewVersion="$VERSION_HASH" --no-transfer-progress
6571
- echo "Version is now $(grep version pom.xml | head -n 1 | sed -n 's/[ \t]*<version>\(.*\)<\/version>/\1/p')"
6672
- |
6773
mvn deploy \
6874
-PpublishingCodeArtifact \
69-
-Dmaven.test.skip=true \
75+
-Pfast-tests-only \
7076
-DperformRelease \
7177
-Dgpg.homedir="$HOME/mvn_gpg" \
7278
-DautoReleaseAfterClose=true \

codebuild/release/release-prod.yml

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ phases:
4343
- cd $CODEBUILD_SRC_DIR
4444
build:
4545
commands:
46+
# Assume Role to access non-prod resources
47+
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-Role-us-west-2" --role-session-name "CB-TestVectorResources")
48+
- export TMP_ROLE
49+
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
50+
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
51+
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken')
52+
- aws sts get-caller-identity
4653
- |
4754
mvn deploy \
4855
-Ppublishing \

codebuild/release/release-staging.yml

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ phases:
4646
- cd $CODEBUILD_SRC_DIR
4747
build:
4848
commands:
49+
# Assume Role to access non-prod resources
50+
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-Role-us-west-2" --role-session-name "CB-TestVectorResources")
51+
- export TMP_ROLE
52+
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
53+
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
54+
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken')
55+
- aws sts get-caller-identity
56+
4957
- VERSION_HASH="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)-$CODEBUILD_RESOLVED_SOURCE_VERSION"
5058
# See https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
5159
- echo "Setting version in POM to $VERSION_HASH"

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
<limit>
240240
<counter>INSTRUCTION</counter>
241241
<value>COVEREDRATIO</value>
242-
<minimum>0.88</minimum>
242+
<minimum>0.87</minimum>
243243
</limit>
244244
<limit>
245245
<counter>BRANCH</counter>

0 commit comments

Comments
 (0)