Skip to content
Prev Previous commit
Next Next commit
fix yaml
  • Loading branch information
TingDaoK committed May 30, 2025
commit e7228e8d4a5df647888328f8062796f768b1ebdd
17 changes: 8 additions & 9 deletions codebuild/cd/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ phases:
pre_build:
commands:
- cd $CODEBUILD_SRC_DIR/aws-crt-java
- git checkout migrate-wip
- export PKG_VERSION=0.38.4
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
- echo $PKG_VERSION
- mkdir -p target/cmake-build/lib
# mv all the platform-specific jars to target/
Expand All @@ -43,18 +42,17 @@ phases:
# Use the username and password from secret manager to update the settings
- sed -i 's|token-username|'"$ST_USERNAME"'|g' $HOME/.m2/settings.xml
- sed -i 's|token-password|'"$ST_PASSWORD"'|g' $HOME/.m2/settings.xml
deploy-snapshot:
commands:
# DEPLOY SNAPSHOT
- cd $CODEBUILD_SRC_DIR/aws-crt-java
# update the version to match the git tag, make a snapshot version we can test
- export DEPLOY_VERSION=${PKG_VERSION}-SNAPSHOT
- mvn -B versions:set -DnewVersion=${DEPLOY_VERSION}
# do a full build/deploy, but skip shared libs and tests, since the shared libs were artifacts above
- mvn -B deploy -Prelease -Dshared-lib.skip=true -Dmaven.test.skip=true
test-snapshot:
commands:
# TEST SNAPSHOT
- mvn -B dependency:get -DrepoUrl=https://central.sonatype.com/repository/maven-snapshots/ -Dartifact=software.amazon.awssdk.crt:aws-crt:${CRT_VERSION}-SNAPSHOT -Dtransitive=false
build-bundle:

build:
commands:
# update the version to match the git tag, make a staging release which we will release once snapshot testing passes
- export DEPLOY_VERSION=${PKG_VERSION}
Expand All @@ -66,10 +64,11 @@ phases:
- bash ./codebuild/cd/deploy-platform-specific-jars.sh
- cd ${BUNDLE_DIR}
- zip -r $CODEBUILD_SRC_DIR/aws-crt-java/bundle.zip .
publish:

post_build:
commands:
- cd $CODEBUILD_SRC_DIR/aws-crt-java
# publish the bundle to sonatype
# Test the publish without promoting the release. You need to manually drop the release.
- export PROMOTE_RELEASE=true
- ./codebuild/cd/publish-bundle.sh
# deploy android
Expand Down
15 changes: 7 additions & 8 deletions codebuild/cd/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ phases:
pre_build:
commands:
- cd $CODEBUILD_SRC_DIR/aws-crt-java
- git checkout migrate-wip
- export PKG_VERSION=0.38.4
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
- echo $PKG_VERSION
- mkdir -p target/cmake-build/lib
# mv all the platform-specific jars to target/
Expand All @@ -43,18 +42,17 @@ phases:
# Use the username and password from secret manager to update the settings
- sed -i 's|token-username|'"$ST_USERNAME"'|g' $HOME/.m2/settings.xml
- sed -i 's|token-password|'"$ST_PASSWORD"'|g' $HOME/.m2/settings.xml
deploy-snapshot:
commands:
# DEPLOY SNAPSHOT
- cd $CODEBUILD_SRC_DIR/aws-crt-java
# update the version to match the git tag, make a snapshot version we can test
- export DEPLOY_VERSION=${PKG_VERSION}-SNAPSHOT
- mvn -B versions:set -DnewVersion=${DEPLOY_VERSION}
# do a full build/deploy, but skip shared libs and tests, since the shared libs were artifacts above
- mvn -B deploy -Prelease -Dshared-lib.skip=true -Dmaven.test.skip=true
test-snapshot:
commands:
# TEST SNAPSHOT
- mvn -B dependency:get -DrepoUrl=https://central.sonatype.com/repository/maven-snapshots/ -Dartifact=software.amazon.awssdk.crt:aws-crt:${CRT_VERSION}-SNAPSHOT -Dtransitive=false
build-bundle:

build:
commands:
# update the version to match the git tag, make a staging release which we will release once snapshot testing passes
- export DEPLOY_VERSION=${PKG_VERSION}
Expand All @@ -66,7 +64,8 @@ phases:
- bash ./codebuild/cd/deploy-platform-specific-jars.sh
- cd ${BUNDLE_DIR}
- zip -r $CODEBUILD_SRC_DIR/aws-crt-java/bundle.zip .
publish:

post_build:
commands:
- cd $CODEBUILD_SRC_DIR/aws-crt-java
# Test the publish without promoting the release. You need to manually drop the release.
Expand Down
Loading