From 7ff1dfd76966717ca5b003309c935ea3389c5478 Mon Sep 17 00:00:00 2001 From: Steve Kim <86316075+sbSteveK@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:29:05 -0700 Subject: [PATCH] use token credentials (#197) --- codebuild/cd/promote-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codebuild/cd/promote-release.yml b/codebuild/cd/promote-release.yml index 2f3160f64e..13701ef3e0 100644 --- a/codebuild/cd/promote-release.yml +++ b/codebuild/cd/promote-release.yml @@ -30,7 +30,7 @@ phases: # install settings.xml to ~/.m2/settings.xml - mkdir -p $HOME/.m2 - aws s3 cp s3://code-sharing-aws-crt/iot-sdk-java-v1.settings.xml $HOME/.m2/settings.xml - - aws --query "SecretString" secretsmanager get-secret-value --secret-id Sonatype/JIRA/Password/V1 > sonatype_secret + - aws --query "SecretString" secretsmanager get-secret-value --secret-id Sonatype/JIRA/token/V1 > sonatype_secret - jq fromjson sonatype_secret > sonatype_json - export ST_PASSWORD=$(jq -r '.password' sonatype_json) - export ST_USERNAME=$(jq -r '.username' sonatype_json) @@ -43,7 +43,7 @@ phases: - sed -i 's/sonatype_Credential/'"$ST_PASSWORD"'/g' $HOME/.m2/settings.xml - sed -i 's/gpg_Principal/'"$GPG_PRINCIPAL"'/g' $HOME/.m2/settings.xml - sed -i 's/gpg_Credential/'"$GPG_CREDENTIAL"'/g' $HOME/.m2/settings.xml - + build: commands: