[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible lede/openwrt/coreboot/netbsd: dont fail if there is nothing to rsync

Holger Levsen holger at layer-acht.org
Sun Apr 30 13:38:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit d3129b584fe6f409dd73f38d581af613b1d0407f
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Apr 30 15:38:48 2017 +0200

    reproducible lede/openwrt/coreboot/netbsd: dont fail if there is nothing to rsync
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_html_rsync_remote_results.sh | 33 +++++++++++++++------------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/bin/reproducible_html_rsync_remote_results.sh b/bin/reproducible_html_rsync_remote_results.sh
index f19b92c..9312707 100755
--- a/bin/reproducible_html_rsync_remote_results.sh
+++ b/bin/reproducible_html_rsync_remote_results.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright 2015 Holger Levsen <holger at layer-acht.org>
+# Copyright 2015-2017 Holger Levsen <holger at layer-acht.org>
 # released under the GPLv=2
 
 DEBUG=false
@@ -16,21 +16,24 @@ rsync_remote_results() {
 		echo "$(date -u) - Starting to rsync results for '$PROJECT'."
 		local RESULTS=$(mktemp --tmpdir=$TEMPDIR -d reproducible-rsync-XXXXXXXXX)
 		# copy the new results from build node to webserver node
-		rsync -r -v -e "ssh -o 'Batchmode = yes'" profitbricks-build3-amd64.debian.net:$BASE/$PROJECT/ $RESULTS
-		chmod 775 $RESULTS
-		# move old results out of the way
-		if [ -d $BASE/$PROJECT ] ; then
-			mv $BASE/$PROJECT ${RESULTS}.tmp
-			# preserve images and css
-			for OBJECT in $(find ${RESULTS}.tmp -name "*css" -o -name "*png" -o -name "*jpg") ; do
-				cp -v $OBJECT $RESULTS/
-			done
-			# delete the old results
-			rm ${RESULTS}.tmp -r
+		if rsync -r -v -e "ssh -o 'Batchmode = yes'" profitbricks-build3-amd64.debian.net:$BASE/$PROJECT/ $RESULTS 2>/dev/null ; then
+			chmod 775 $RESULTS
+			# move old results out of the way
+			if [ -d $BASE/$PROJECT ] ; then
+				mv $BASE/$PROJECT ${RESULTS}.tmp
+				# preserve images and css
+				for OBJECT in $(find ${RESULTS}.tmp -name "*css" -o -name "*png" -o -name "*jpg") ; do
+					cp -v $OBJECT $RESULTS/
+				done
+				# delete the old results
+				rm ${RESULTS}.tmp -r
+			fi
+			# make the new results visible
+			mv $RESULTS $BASE/$PROJECT
+			echo "$(date -u) - $REPRODUCIBLE_URL/$PROJECT has been updated."
+		else
+			echo "$(date -u) - no new results for '$PROJECT' found."
 		fi
-		# make the new results visible
-		mv $RESULTS $BASE/$PROJECT
-		echo "$(date -u) - $REPRODUCIBLE_URL/$PROJECT has been updated."
 	done
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list