forked from rudderlabs/rudder-sdk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.staging.yaml
20 lines (19 loc) · 1.03 KB
/
buildspec.staging.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
version: 0.2
phases:
install:
runtime-versions:
nodejs: 14
build:
commands:
- npm ci --unsafe-perm
- npm run test
- npm run buildProdBrowser --staging=true
- npm run buildAllIntegrations --staging=true
- sed -i -e 's|{{RS_BUGSNAG_API_KEY}}|'$RS_BUGSNAG_API_KEY'|' dist/rudder-analytics-staging.min.js
- aws s3 cp dist/rudder-analytics-staging.min.js s3://$S3_BUCKET_NAME/v1.1/rudder-analytics-staging.min.js --cache-control max-age=3600 --acl public-read
- aws s3 cp dist/rudder-analytics-staging.min.js.map s3://$S3_BUCKET_NAME/v1.1/rudder-analytics-staging.min.js.map --cache-control max-age=3600 --acl public-read
- aws s3 cp dist/integrations/ s3://$S3_BUCKET_NAME/v1.1/js-integrations/ --recursive --cache-control max-age=3600 --acl public-read
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/v1.1/rudder-analytics-staging.min.js" "/v1.1/rudder-analytics-staging.min.js.map" "/v1.1/js-integrations*"
artifacts:
files:
- '**/*'