Skip to content

Commit f6329aa

Browse files
committed
[ci] Persist snapshot in s3 bucket
1 parent 8ed64e7 commit f6329aa

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.circleci/config.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,20 @@ jobs:
246246
- run:
247247
name: Create a size snapshot
248248
command: yarn size:snapshot
249-
# For debugging/working on a PR
249+
# downloaded by aws lambda to s3 bucket
250+
# lambda allowes us to limit this to mui-org branches only while hiding credentials
251+
# that would allow write access to s3
250252
- store_artifacts:
251253
path: size-snapshot.json
254+
- run:
255+
name: Possibly persist size snapshot
256+
command: |
257+
if [ $CIRCLE_BRANCH ~= ^pull/ ]; then
258+
echo "pull request; do not persist the size snapshot"
259+
else
260+
echo "no pull request; lets persist the size snapshot"
261+
curl -X PUT --header "x-api-key: $CIRCLE_AWS_API_KEY" https://t6nulys5kl.execute-api.us-east-1.amazonaws.com/v1/persist-size-snapshot?build-id=$CIRCLE_BUILD_NUM
262+
fi
252263
workflows:
253264
version: 2
254265
pipeline:

0 commit comments

Comments
 (0)