Skip to content

Commit

Permalink
BUILD-6437 Fix dogfooding pipeline by invalidating feed.xml CloudFron…
Browse files Browse the repository at this point in the history
…t cache
  • Loading branch information
matemoln committed Sep 30, 2024
1 parent 62ca1e9 commit d66f1fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cirrus/publish-dogfood-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
set -euo pipefail

: "${AWS_ACCESS_KEY_ID?}" "${AWS_SECRET_ACCESS_KEY?}" "${AWS_SESSION_TOKEN?}"

set -x

: "${S3_BUCKET:=downloads-cdn-eu-central-1-prod}"
ROOT_BUCKET_KEY="SonarLint-for-VisualStudio/dogfood"
DISTRIBUTION_ID="E2WHX4O0Y6Z6C6" # Downloads-CDN-Distribution-Prod
dogfood_site_dir="$1"

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

0 comments on commit d66f1fa

Please sign in to comment.