[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Re-enable the tests for live-build images.

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Aug 27 14:20:47 BST 2022



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


Commits:
e4d7f0b5 by Roland Clobus at 2022-08-27T15:19:52+02:00
Re-enable the tests for live-build images.

If the snapshot server is not available, use deb.debian.org instead

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

- - - - -


2 changed files:

- bin/reproducible_debian_live_build.sh
- job-cfg/reproducible.yaml


Changes:

=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -57,7 +57,7 @@ cleanup() {
 			publish_file DiffoscopeOutput ${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html ${CONFIGURATION}-${DEBIAN_VERSION}.html
 		else
 			output_echo "Error: Something went wrong."
-			printenv > environment.txt
+			printenv >environment.txt
 			publish_file Environment ${PWD}/environment.txt ${CONFIGURATION}-${DEBIAN_VERSION}.txt
 		fi
 	fi
@@ -89,6 +89,30 @@ if [ -z "${CONFIGURATION}" -o -z "${DEBIAN_VERSION}" ]; then
 	exit 1
 fi
 
+# Configuration option: Select the server for the repository
+# Allowed values:
+#  auto (default): Detect the best available server
+#  snapshot (preferred): Use a snapshot server
+#  archive (fallback): Use deb.debian.org if a snapshot server is not available
+#
+# Note that 'archive' allows only for a time window of about 6 hours to test for reproducibility
+export REPOSERVER=auto
+
+if [ "${REPOSERVER}" == "auto" ]; then
+	set +e # We are interested in the return value
+	wget --quiet --no-hsts http://snapshot.notset.fr/mr/timestamp/debian/latest --output-document latest
+	RETURNVALUE=$?
+	rm -f latest
+	set -e
+	if [ ${RETURNVALUE} -eq 0 ]; then
+		export REPOSERVER=snapshot
+	else
+		# The snapshot server is not available
+		output_echo "Info: The snapshot server is not available, using deb.debian.org instead."
+		export REPOSERVER=archive
+	fi
+fi
+
 # Cleanup if something goes wrong
 trap cleanup INT TERM EXIT
 
@@ -118,15 +142,13 @@ cd ..
 output_echo "Running the rebuild script for the 1st build."
 set +e # We are interested in the return value
 # The 3rd argument is provided to allow for local testing of this script.
-# - If SNAPSHOT_TIMESTAMP is already set, use that timestamp instead of the latest snapshot
+# - If SNAPSHOT_TIMESTAMP is already set, use that value
+# - If SNAPSHOT_TIMESTAMP is not set, use REPOSERVER
+export SNAPSHOT_TIMESTAMP="${SNAPSHOT_TIMESTAMP:-${REPOSERVER}}"
 rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
 RETURNVALUE=$?
 grep --quiet --no-messages "Build result: 0" summary.txt
 BUILD_OK_FOUND=$?
-
-# Retrieve the timestamp that was used
-export SNAPSHOT_TIMESTAMP=$(grep --no-messages "Snapshot timestamp:" summary.txt | cut -f 3 -d " ")
-
 set -e
 
 if [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then
@@ -138,6 +160,12 @@ if [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then
 	fi
 	output_echo "Warning: the build failed with ${RETURNVALUE}. The latest snapshot might not be complete (yet). Now trying again using the previous snapshot instead."
 	rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
+else
+	# Determine the value of SNAPSHOT_TIMESTAMP for the second build
+	# If 'archive' is used for the first build, use it for the second build too and hope that the same timestamp will still be available
+	if [ "${SNAPSHOT_TIMESTAMP}" != "archive" ]; then
+		export SNAPSHOT_TIMESTAMP=$(grep --no-messages "Snapshot timestamp:" summary.txt | cut -f 3 -d " ")
+	fi
 fi
 
 # Move the image away


=====================================
job-cfg/reproducible.yaml
=====================================
@@ -1012,7 +1012,7 @@
     my_recipients: 'qa-jenkins-scm at lists.alioth.debian.org'
     my_node: '{my_hname}'
     my_timeout: '720'
-    my_disabled: true
+    my_disabled: false
     imagetype:
         - "smallest-build"
         - cinnamon



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/e4d7f0b59b9bd919990195ba1e3c563bd1c9bf31

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/e4d7f0b59b9bd919990195ba1e3c563bd1c9bf31
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/20220827/00d65c7d/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list