Skip to content

Commit ad725e0

Browse files
committed
Try CF invalidation
1 parent 2da65e4 commit ad725e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bitbucket-pipelines.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,8 @@ definitions:
220220
script:
221221
- aws configure set aws_access_key_id $AWS_ACCESS_CF_KEY_ID
222222
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_CF_KEY
223-
- aws configure set default.region $AWS_REGION
224223
- export CLOUDFRONT_NAME=$(echo "$BITBUCKET_BRANCH" | awk -F'/' '{if(NF==1)val=$1;else if(NF==2)val=$2;else if(NF==3)val=$2;else val=$3;gsub(/_/, "-", val);print tolower(val)}')
225-
- echo $CLOUDFRONT_NAME
226-
- export CLOUDFRONT_DISTRIBUTION_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Comment=='dev--$CLOUDFRONT_NAME'].Id" --output text)
227-
- echo $CLOUDFRONT_DISTRIBUTION_ID
224+
- export CLOUDFRONT_DISTRIBUTION_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Comment=='dev--${CLOUDFRONT_NAME}'].Id" --output text)
228225
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
229226

230227
- step: &find-and-invalidate-cloudfront-staging

0 commit comments

Comments
 (0)