[buildbot-][r3] use a function to send snapshot, rsync after a successful build

10 views
Skip to first unread message

h...@geexbox.org

unread,
Mar 13, 2013, 3:37:01 PM3/13/13
to com...@geexbox.org
changeset c668829c61c7 in /var/www/hg/buildbot
author: Thomas Genty <toml...@openbricks.org>
details: http://hg.geexbox.org/buildbot?cmd=changeset;node=c668829c61c7
description:
use a function to send snapshot, rsync after a successful build
diffstat:

buildbot.sh | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r 9975525bbb11 -r c668829c61c7 buildbot.sh
--- a/buildbot.sh Wed Mar 13 11:58:31 2013 +0100
+++ b/buildbot.sh Wed Mar 13 12:08:48 2013 +0100
@@ -42,6 +42,17 @@
EOF
}

+sendsnapshot ()
+{
+ log "Rsyncing snapshots to fry"
+ rsync --bwlimit=75 --archive --delete $SNAPSHOTS/* buil...@fry.geexbox.org:/data/snapshots >> $BUILDLOG 2>&1
+ if [ $? -eq 0 ]; then
+ log "rsync successful"
+ else
+ log "rsync failed"
+ fi
+}
+
mkdir -p $BUILD $SOURCES $SNAPSHOTS $STAMPS/$REPONAME $LOGS $STAMPSGET
log "Starting"
if [ -r $STAMPS/lock ]; then
@@ -99,6 +110,9 @@
fi
fi

+# in case previous one failed
+sendsnapshot
+
# build configs
for conffile in $REPO/config/defconfigs/*.conf; do
cd $BUILD
@@ -155,6 +169,8 @@
cp -PR binaries/* "$SNAPSHOTS/$REPONAME/$NAME/$DATE"
rm -f $SNAPSHOTS/$REPONAME/$NAME/latest
ln -sf $DATE "$SNAPSHOTS/$REPONAME/$NAME/latest"
+ sendsnapshot
+ # send snapshot, don't wait
else
log "$NAME build failed"
mailfail build
@@ -164,12 +180,5 @@
lbzip2 -9 $BUILDLOG
done

-log "Rsyncing snapshots to fry"
-rsync --archive --delete $SNAPSHOTS/* buil...@fry.geexbox.org:/data/snapshots >> $BUILDLOG 2>&1
-if [ $? -eq 0 ]; then
- log "rsync successful"
-else
- log "rsync failed"
-fi
rm -f $STAMPS/lock
log "Quitting"
Reply all
Reply to author
Forward
0 new messages