Skip to content

Commit cba1c39

Browse files
committed
ansible: mirror upload_to_cloudflare.sh changes
1 parent d9c4ea9 commit cba1c39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ansible/www-standalone/tools/promote/upload_to_cloudflare.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ fi
4242
relativedir=${dstdir/$dist_rootdir/"$site/"}
4343
tmpversion=$2
4444

45-
aws s3 cp $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks
45+
# Due to R2 limitations, `aws s3 cp` and `aws s3 sync` only succeed in copying
46+
# different sets of files across. Fortunately the sets are disjoint, so running
47+
# both commands (ignoring errors) will copy all the files across.
48+
aws s3 cp $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks --copy-props none || true
49+
aws s3 sync $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --no-follow-symlinks || true
4650
aws s3 cp $staging_bucket/$relativedir/index.json $dist_bucket/$relativedir/index.json --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile
4751
aws s3 cp $staging_bucket/$relativedir/index.tab $dist_bucket/$relativedir/index.tab --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile

0 commit comments

Comments
 (0)