]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
livebuild: do not transfer all files
authorMathias Klette <mathias.klette@profitbricks.com>
Mon, 30 Jul 2012 18:15:58 +0000 (20:15 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Mon, 30 Jul 2012 18:15:58 +0000 (20:15 +0200)
live_build.sh

index 733d8200dee661d2a3a9480805468472be7067e8..0cf7790b1928341d213b3daa26455c2ba1a28fcf 100755 (executable)
@@ -35,10 +35,12 @@ case $LIVE_TYPE in
     default|staging)
         RSYNC_SRC="$RSYNC_BASE/"
         RSYNC_DST="livebuild@10.1.1.1/livebuild/"
+        RSYNC_FILTER="--filter=\"+ default-*\" --filter=\"+ staging-*\" --filter=\"- *\""
         ;;
-    pbb)
+    pbb|pre-staging)
         RSYNC_SRC="$BUILD_TARGET/"
         RSYNC_DST="livebuild@10.254.1.1/livebuild/"
+        RSYNC_FILTER="--filter=\"+ pbb-*\" --filter=\"+ pre-staging-*\" --filter=\"- *\""
         ;;
 esac
 
@@ -83,7 +85,7 @@ echo
 cat $BUILD_TARGET/pserver.packages
 echo
 echo "Now rsyncing results to $RSYNC_BASE ..."
-rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete $RSYNC_SRC/ rsync://$RSYNC_DST
+rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete --delete-excluded $RSYNC_FILTER $RSYNC_SRC/ rsync://$RSYNC_DST
 
 figlet "mirror OK"