Skip to content

Commit 1f89b4c

Browse files
committed
BUILD-6437 Fix dogfooding pipeline by invalidating CloudFront cache
1 parent 62ca1e9 commit 1f89b4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.cirrus/publish-dogfood-site.sh

+5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
set -euo pipefail
44

55
: "${AWS_ACCESS_KEY_ID?}" "${AWS_SECRET_ACCESS_KEY?}" "${AWS_SESSION_TOKEN?}"
6+
7+
set -x
8+
69
: "${S3_BUCKET:=downloads-cdn-eu-central-1-prod}"
710
ROOT_BUCKET_KEY="SonarLint-for-VisualStudio/dogfood"
11+
DISTRIBUTION_ID="E2WHX4O0Y6Z6C6" # Downloads-CDN-Distribution-Prod
812
dogfood_site_dir="$1"
913

1014
echo "Upload from $dogfood_site_dir to s3://$S3_BUCKET/$ROOT_BUCKET_KEY/"
1115
aws s3 sync --delete "$dogfood_site_dir" "s3://$S3_BUCKET/$ROOT_BUCKET_KEY/"
16+
aws cloudfront create-invalidation --distribution-id "${DISTRIBUTION_ID}" --paths "/${ROOT_BUCKET_KEY}/*"

0 commit comments

Comments
 (0)