[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Fri Jun 25 17:49:37 BST 2021



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
0f464b5a by Holger Levsen at 2021-06-25T18:48:13+02:00
refactoring

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
896811d9 by Holger Levsen at 2021-06-25T18:48:39+02:00
whitespaces

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
811b5ab7 by Holger Levsen at 2021-06-25T18:49:27+02:00
also sync debian_live_build results to jenkins

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_html_rsync_remote_results.sh


Changes:

=====================================
bin/reproducible_html_rsync_remote_results.sh
=====================================
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright 2015-2019 Holger Levsen <holger at layer-acht.org>
+# Copyright 2015-2021 Holger Levsen <holger at layer-acht.org>
 # released under the GPLv2
 
 DEBUG=false
@@ -12,32 +12,34 @@ common_init "$@"
 
 # that's all
 rsync_remote_results() {
-	for PROJECT in coreboot netbsd ; do
-		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
-		if rsync -r -v -e "ssh -o 'Batchmode = yes'" osuosl171-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."
+	PROJECT=$1
+	NODE=$2
+	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
+	if rsync -r -v -e "ssh -o 'Batchmode = yes'" $NODE:$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
-	done
+		# 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
 }
 
 # main
 echo "$(date -u) - Starting to rsync results."
-rsync_remote_results
+rsync_remote_results coreboot 		osuosl171-amd64.debian.net
+rsync_remote_results netbsd		osuosl171-amd64.debian.net
+rsync_remote_results debian_live_build	osuosl173-amd64.debian.net
 echo "$(date -u) - the end."



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/1006e099295ae2fa3dbef303d4fff75b3b5a5282...811b5ab7c9eef5aeea33e11826ac5322997e76ba

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/1006e099295ae2fa3dbef303d4fff75b3b5a5282...811b5ab7c9eef5aeea33e11826ac5322997e76ba
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210625/1ac39c1b/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list