From ca0235a9e19b68b9bba38eb2cf19c097eed34ad3 Mon Sep 17 00:00:00 2001 From: Kris Booker Date: Wed, 13 Mar 2024 13:02:30 -0600 Subject: [PATCH] Updating to obfuscate sensitive AWS account information. --- tests/ci/Jenkinsfile.combined | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ci/Jenkinsfile.combined b/tests/ci/Jenkinsfile.combined index 38c9efc589..47fb97ec73 100644 --- a/tests/ci/Jenkinsfile.combined +++ b/tests/ci/Jenkinsfile.combined @@ -258,6 +258,8 @@ pipeline { agent none environment { ACCNR = 'epic' + AWS_PROD_ACCOUNT_ID = credentials('AWS_PROD_ACCOUNT_ID') + AWS_PROD_SNS_TOPIC = credentials('AWS_PROD_SNS_TOPIC') GITHUB_TOKEN = credentials('GithubJenkinsNew') GIT_URL = 'https://github.com/ufs-community/ufs-weather-model.git' } @@ -285,7 +287,7 @@ pipeline { node('built-in') { echo 'This will run only if successful.' sh ''' - aws sns publish --topic-arn "arn:aws:sns:us-east-1:211527314271:Jenkins-CICD-Notifications" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":sunny: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *succeeded*"}}' + aws sns publish --topic-arn "arn:aws:sns:us-east-1:${AWS_PROD_ACCOUNT_ID}:${AWS_PROD_SNS_TOPIC}" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":sunny: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *succeeded*"}}' ''' } } @@ -293,7 +295,7 @@ pipeline { node('built-in') { echo 'This will run only if the run was marked as unstable.' sh ''' - aws sns publish --topic-arn "arn:aws:sns:us-east-1:211527314271:Jenkins-CICD-Notifications" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":warning: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *failed!*"}}' + aws sns publish --topic-arn "arn:aws:sns:us-east-1:${AWS_PROD_ACCOUNT_ID}:${AWS_PROD_SNS_TOPIC}" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":warning: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *failed!*"}}' ''' } }