]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
only rsync images for non-development builds
authorHolger Levsen <holger@layer-acht.org>
Thu, 25 Oct 2012 11:17:53 +0000 (13:17 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 25 Oct 2012 11:17:53 +0000 (13:17 +0200)
liveboot_build.sh

index 4f97d469352be665810d521b558fe3faded626fe..bd97392dfc00fa6b5f6815020850994652fb8e57 100755 (executable)
@@ -59,11 +59,15 @@ rm $BUILD_SCRIPT
 BUILD_END=$(date +%s)
 $SCRIPTSDIR/liveboot2db.py $JOB_NAME $BUILD_NUMBER $REQUEST_ID $BUILD_START $BUILD_END "successful"
 
-# FIXME: too much sudo here...
-cd /srv/build/liveboot/builds
-sudo mv *-* /srv/mirror/liveboot
-cd /srv/build/
-sudo rm liveboot -Rf
+if [ "$GIT_BRANCH" = "master" ] ; then
+       # FIXME: too much sudo here...
+       cd /srv/build/liveboot/builds
+       sudo mv *-* /srv/mirror/liveboot
+       cd /srv/build/
+       sudo rm liveboot -Rf
+else
+       echo "Development build, no rsyncing of images."
+fi
 
 #
 # remove trap to not set failure at the end :)