From ac6bc5d909195b8e216221a554dbfb2f31d507bf Mon Sep 17 00:00:00 2001 From: Casey Rapnicki Date: Wed, 17 Apr 2024 11:46:23 -0400 Subject: [PATCH] Fix environment var name. --- scripts/pipeline/s3-backup-download.sh | 6 +++--- scripts/pipeline/s3-backup-post-restore.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/pipeline/s3-backup-download.sh b/scripts/pipeline/s3-backup-download.sh index 878bdb535..626ae6c16 100755 --- a/scripts/pipeline/s3-backup-download.sh +++ b/scripts/pipeline/s3-backup-download.sh @@ -2,15 +2,15 @@ set -e -backup_bucket="${PROJECT}-backup-${ENVIRONMENT}" -space="${PROJECT}-${ENVIRONMENT}" +backup_bucket="${PROJECT}-backup-${BRANCH}" +space="${PROJECT}-${BRANCH}" echo "Getting backup bucket credentials..." { cf target -s "${space}" service="${backup_bucket}" - service_key="${service}-pipeline-download-${ENVIRONMENT}-key" + service_key="${service}-pipeline-download-${BRANCH}-key" cf delete-service-key "${service}" "${service_key}" -f cf create-service-key "${service}" "${service_key}" sleep 2 diff --git a/scripts/pipeline/s3-backup-post-restore.sh b/scripts/pipeline/s3-backup-post-restore.sh index 814761d48..a049a1dbc 100755 --- a/scripts/pipeline/s3-backup-post-restore.sh +++ b/scripts/pipeline/s3-backup-post-restore.sh @@ -2,8 +2,8 @@ set -e -backup_bucket="${PROJECT}-backup-${ENVIRONMENT}" -space="${PROJECT}-${ENVIRONMENT}" +backup_bucket="${PROJECT}-backup-${BRANCH}" +space="${PROJECT}-${BRANCH}" if [ -z "${S3_FILE_PATH}" ]; then echo "Getting backup bucket credentials..." @@ -11,7 +11,7 @@ if [ -z "${S3_FILE_PATH}" ]; then cf target -s "${space}" service="${backup_bucket}" - service_key="${service}-pipeline-post-restore-${ENVIRONMENT}-key" + service_key="${service}-pipeline-post-restore-${BRANCH}-key" cf delete-service-key "${service}" "${service_key}" -f cf create-service-key "${service}" "${service_key}" sleep 2