]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
create the sync-push script 281/head
authorAlfredo Deza <adeza@redhat.com>
Thu, 7 Jan 2016 21:37:59 +0000 (16:37 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 7 Jan 2016 21:37:59 +0000 (16:37 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
scripts/sync-push [new file with mode: 0644]

diff --git a/scripts/sync-push b/scripts/sync-push
new file mode 100644 (file)
index 0000000..ca19a02
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+# This script will push repository files from the signer box to the upstream repositories.
+# By default it will sync all releases defined, but can optionally take one or more
+# releases to sync:
+#
+#     sync-push hammer infernalis
+#
+# Since the binaries are created with a different repository layout, this
+# script maps directories like "centos/6" to "rpm-$release/el6"
+
+releases=${*:-"firefly giant hammer infernalis testing"}
+
+ceph_sync() {
+  release=$1
+  deb_cmd="/opt/repos/ceph/$release/debian/jessie/* dhc-user@download.ceph.com:/home/dhc-user/repos/debian-$release/"
+  rsync --progress -avr $deb_cmd
+
+  el6_cmd="/opt/repos/ceph/$release/centos/6/* dhc-user@download.ceph.com:/home/dhc-user/repos/rpm-$release/el6/"
+  el7_cmd="/opt/repos/ceph/$release/centos/7/* dhc-user@download.ceph.com:/home/dhc-user/repos/rpm-$release/el7/"
+  rsync --progress -avr $el6_cmd
+  rsync --progress -avr $el7_cmd
+}
+
+for i in "${releases[@]}"
+do
+   ceph_sync $i
+done