Skip to content

Commit 3dcdbbf

Browse files
Pass the repository ID via secret (#355)
1 parent 07668ce commit 3dcdbbf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

codebuild/cd/deploy-snapshot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ phases:
5757
- mvn -B versions:set -DnewVersion=${PKG_VERSION}
5858
- mvn -B deploy -Prelease -Dmaven.test.skip=true -Dgpg.passphrase=$GPG_PASSPHRASE | tee /tmp/deploy.log
5959
- cat /tmp/deploy.log | grep "Created staging repository with ID" | cut -d\" -f2 | tee /tmp/repositoryId.txt
60+
# Store the repository ID in a secret for use later
61+
- aws secretsmanager update-secret --secret-id cd/aws-iot-device-sdk-java-v2/repository-id --secret-string "$(cat /tmp/repositoryId.txt)" --region us-east-1
6062

6163
artifacts:
6264
discard-paths: yes

codebuild/cd/promote-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ phases:
3939

4040
- gpg --batch --import /tmp/aws-sdk-common-runtime.key.asc
4141
- export GPG_PASSPHRASE=$(aws --query "SecretString" secretsmanager get-secret-value --secret-id cd/aws-crt-java-key/password | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
42-
- export REPOSITORY_ID=$(cat $CODEBUILD_SRC_DIR_aws_iot_device_sdk_java_v2_jar/repositoryId.txt)
42+
- export REPOSITORY_ID=$(aws --query "SecretString" secretsmanager get-secret-value --secret-id cd/aws-iot-device-sdk-java-v2/repository-id --region us-east-1 | sed -e 's/[\\\"\}]//g')
4343

4444
# Java 17 needs special JDK options apparently. It is a known Sonatype issue.
4545
# Issue link: https://issues.sonatype.org/browse/NEXUS-27902

0 commit comments

Comments
 (0)