]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
sync-push: add staging_dir for releases under construction 2172/head
authorDan Mick <dmick@redhat.com>
Tue, 24 Oct 2023 22:50:41 +0000 (15:50 -0700)
committerDan Mick <dmick@redhat.com>
Tue, 24 Oct 2023 22:52:12 +0000 (15:52 -0700)
Signed-off-by: Dan Mick <dmick@redhat.com>
scripts/sync-push

index 5418cefd713b022ee538e0e921a7177c391844b3..a2cd56bbaa6e8554013a92995a7c66a6034aa31b 100755 (executable)
@@ -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!"