Skip to content

Commit

Permalink
ansible: don't assume the relative paths for staging & dist are the s…
Browse files Browse the repository at this point in the history
…ame (#3947)

Some non-mainline releases' src dirs differ from their dst dirs (i.e.
v8-canary builds upload to `/home/staging/nodejs/custom` and then are
promoted to `/home/dist/nodejs/v8-canary`. This wasn't being accounted
for when we promoted files from the `dist-staging` bucket to the
    `dist-prod` bucket.

Signed-off-by: flakey5 <[email protected]>
  • Loading branch information
flakey5 authored Nov 4, 2024
1 parent 8fc01e0 commit 8e294e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ansible/www-standalone/tools/promote/upload_to_cloudflare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ if [ -z ${staging_bucket+x} ]; then
exit 1
fi

relativedir=${dstdir/$dist_rootdir/"$site/"}
relative_srcdir=${srcdir/$staging_rootdir/"$site/"}
relative_dstdir=${dstdir/$dist_rootdir/"$site/"}
tmpversion=$2

rclone copy $staging_bucket/$relativedir/$tmpversion/ $prod_bucket/$relativedir/$tmpversion/
rclone copyto $staging_bucket/$relativedir/index.json $prod_bucket/$relativedir/index.json
rclone copyto $staging_bucket/$relativedir/index.tab $prod_bucket/$relativedir/index.tab
rclone copy $staging_bucket/$relative_srcdir/$tmpversion/ $prod_bucket/$relative_dstdir/$tmpversion/
rclone copyto $staging_bucket/$relative_dstdir/index.json $prod_bucket/$relative_dstdir/index.json
rclone copyto $staging_bucket/$relative_dstdir/index.tab $prod_bucket/$relative_dstdir/index.tab

0 comments on commit 8e294e9

Please sign in to comment.