From a23dc2ec09b3831567d08e72ab7e186070cfe006 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 24 Oct 2023 15:50:41 -0700 Subject: [PATCH] sync-push: add staging_dir for releases under construction Signed-off-by: Dan Mick --- scripts/sync-push | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/scripts/sync-push b/scripts/sync-push index 5418cefd..a2cd56bb 100755 --- a/scripts/sync-push +++ b/scripts/sync-push @@ -8,6 +8,10 @@ # Since the binaries are created with a different repository layout, this # script maps directories like "centos/6" to "rpm-$release/el6" +# this directory is auth-protected so anxious users don't try to +# pull an in-progress release +staging_dir=/data/download.ceph.com/www/staging + releases=${*:-"pacific quincy reef"} ceph_sync() { @@ -26,21 +30,21 @@ ceph_sync() { if $newgen; then version=$(echo $path | cut -d '-' -f2) - ssh signer@download.ceph.com "mkdir -p /data/download.ceph.com/www/debian-$version" + ssh signer@download.ceph.com "mkdir -p ${staging_dir}/debian-$version" - deb_cmd="$path/debian/jessie/* signer@download.ceph.com:/data/download.ceph.com/www/debian-$version/" + deb_cmd="$path/debian/jessie/* signer@download.ceph.com:${staging_dir}/debian-$version/" else - deb_cmd="$path/debian/jessie/* signer@download.ceph.com:/data/download.ceph.com/www/debian-$release/" + deb_cmd="$path/debian/jessie/* signer@download.ceph.com:${staging_dir}/debian-$release/" fi rsync --progress --exclude '*lockfile*' -avr $deb_cmd for el_version in 7 8 9; do if $newgen; then - ssh signer@download.ceph.com "mkdir -p /data/download.ceph.com/www/rpm-$version/el$el_version" + ssh signer@download.ceph.com "mkdir -p ${staging_dir}/rpm-$version/el$el_version" - el_cmd="$path/centos/$el_version/* signer@download.ceph.com:/data/download.ceph.com/www/rpm-$version/el${el_version}/" + el_cmd="$path/centos/$el_version/* signer@download.ceph.com:${staging_dir}/rpm-$version/el${el_version}/" else - el_cmd="$path/centos/$el_version/* signer@download.ceph.com:/data/download.ceph.com/www/rpm-$release/el${el_version}/" + el_cmd="$path/centos/$el_version/* signer@download.ceph.com:${staging_dir}/rpm-$release/el${el_version}/" fi if [ -d "$path/centos/$el_version" ]; then rsync --progress -avr $el_cmd @@ -50,7 +54,7 @@ ceph_sync() { # Since paths are listed alphabetically/numerically in the first `for` loop, the last $version is what gets used for the new symlink below. if $newgen; then - ssh signer@download.ceph.com "cd /data/download.ceph.com/www/; \ + ssh signer@download.ceph.com "cd ${staging_dir}/; \ ln -sfn debian-$version debian-$release; \ ln -sfn rpm-$version rpm-$release" fi @@ -60,3 +64,6 @@ for i in "${releases[@]}" do ceph_sync $i done + +echo "Once you've tested the repos at ${staging_dir}, don't forget to mv them +up to the parent directory!" -- 2.47.3