mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[web] upload to CDN buckets concurrently (#23494)
* [web] upload to CDN buckets concurrently * [web] documentation for detaching, recording of pid and waiting GitOrigin-RevId: abdb357771d9c5e34330827b146ae43eb6146675
This commit is contained in:
@@ -55,10 +55,17 @@ if [[ "$BRANCH_NAME" == "main" ]] || [[ "$BRANCH_NAME" == "staging-main" ]]; the
|
||||
bin/compress_assets
|
||||
|
||||
upload_into_bucket "$CDN_STAG" &&
|
||||
verify_upload_into_bucket "$CDN_STAG" || exit 3
|
||||
verify_upload_into_bucket "$CDN_STAG" || exit 3 &
|
||||
pid_staging=$! # record pid of the detached process "upload && verify || exit 3")
|
||||
|
||||
pid_production=
|
||||
# Only upload to production CDN if branch is
|
||||
if [[ "$BRANCH_NAME" == "main" ]]; then
|
||||
upload_into_bucket "$CDN_PROD" &&
|
||||
verify_upload_into_bucket "$CDN_PROD" || exit 3
|
||||
verify_upload_into_bucket "$CDN_PROD" || exit 4 &
|
||||
pid_production=$! # record pid of the detached process "upload && verify || exit 4")
|
||||
fi
|
||||
|
||||
wait "$pid_staging" # wait for staging upload to finish, wait(1) will exit if the upload failed
|
||||
wait "$pid_production" # wait for production upload to finish (if started), wait(1) will exit if the upload failed
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user