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