[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible_debian_live_build: logparsing

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Fri Aug 27 09:30:18 BST 2021



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
17bd5c66 by Roland Clobus at 2021-08-27T08:52:54+02:00
reproducible_debian_live_build: logparsing

- - - - -
b984f8e4 by Roland Clobus at 2021-08-27T08:54:43+02:00
reproducible_common: Fixed html markup

- - - - -


3 changed files:

- bin/reproducible_common.sh
- bin/reproducible_debian_live_build.sh
- logparse/reproducible.rules


Changes:

=====================================
bin/reproducible_common.sh
=====================================
@@ -627,8 +627,8 @@ save_artifacts() {
 	echo "<p>" > $HEADER
 	printf "$msg" | sed 's#$#<br />#g' >> $HEADER
 	echo "<a href=\"$MOREINFO_URL\">More information</a><br />" >> $HEADER
-	if [ ! -z ${BUILD_URL} ] ; then
-		echo "These artifacts were created by <a href=\"${BUILD_URL}\">${BUILD_TAG}</a>br />" >> $HEADER
+	if [ ! -z "${BUILD_URL}" ] ; then
+		echo "These artifacts were created by <a href=\"${BUILD_URL}\">${BUILD_TAG}</a><br />" >> $HEADER
 	fi
 	echo "</p>" >> $HEADER
 	chmod 644 $HEADER


=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -51,14 +51,14 @@ case $1 in
   "mate")           export INSTALLER="live"; export PACKAGES="live-task-mate"; ;;
   "standard")       export INSTALLER="live"; export PACKAGES="live-task-standard"; ;;
   "xfce")           export INSTALLER="live"; export PACKAGES="live-task-xfce"; ;;
-  *) output_echo "Bad argument 1: $1"; exit 1; ;;
+  *) output_echo "Error: Bad argument 1: $1"; exit 1; ;;
 esac
 export CONFIGURATION="$1"
 
 # Argument 2 = Debian version
 # No further validation required, reproducible.yaml should be correct
 if [ -z "$2" ] ; then
-   output_echo "Bad argument 2: it is empty"
+   output_echo "Error: Bad argument 2: it is empty"
    exit 2
 fi
 export DEBIAN_VERSION="$2"
@@ -80,7 +80,7 @@ export RESULTSDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t ${PROJECTNAM
 export LIVE_BUILD=${BUILDDIR}/latest-live-build
 git clone https://salsa.debian.org/live-team/live-build.git ${LIVE_BUILD} --single-branch --no-tags
 pushd ${LIVE_BUILD}
-output_echo "Received git version $(git log -1 --pretty=oneline)"
+output_echo "Info: using live-build from git version $(git log -1 --pretty=oneline)"
 popd
 
 export LB_OUTPUT=${RESULTSDIR}/lb_output.txt
@@ -89,6 +89,7 @@ wget https://debian.notset.fr/snapshot/mr/timestamp/debian/latest --output-docum
 export SNAPSHOT_TIMESTAMP=$(cat ${RESULTSDIR}/latest | awk '/"result":/ { split($0, a, "\""); print a[4] }')
 export SOURCE_DATE_EPOCH=$(date -d $(echo ${SNAPSHOT_TIMESTAMP} | awk '{ printf "%s-%s-%sT%s:%s:%sZ", substr($0,1,4), substr($0,5,2), substr($0,7,2), substr($0,10,2), substr($0,12,2), substr($0,14,2) }') +%s)
 export MIRROR=http://debian.notset.fr/snapshot/archive/debian/${SNAPSHOT_TIMESTAMP}
+output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP})"
 
 # Configuration for the smallest live image (mini, without installer)
 # - For /etc/apt/sources.list: Use the mirror from ${MIRROR}, no security, no updates
@@ -258,7 +259,7 @@ EOF
 sudo lb build | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb config failed with $RESULT"
+   output_echo "Warning: lb build failed with $RESULT"
 fi
 
 # Move the image away
@@ -269,7 +270,7 @@ mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
 sudo lb clean --purge | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb config failed with $RESULT"
+   output_echo "Warning: lb clean failed with $RESULT"
 fi
 
 # Re-activate the previous configuration
@@ -279,7 +280,7 @@ lb config
 sudo lb build | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb config failed with $RESULT"
+   output_echo "Warning: lb build failed with $RESULT"
 fi
 
 # Move the image away
@@ -290,7 +291,7 @@ mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
 sudo lb clean --purge | tee -a $LB_OUTPUT
 RESULT=$?
 if [ "$RESULT" != "0" ] ; then
-   output_echo "Warning: lb config failed with $RESULT"
+   output_echo "Warning: lb clean failed with $RESULT"
 fi
 
 # The workspace is no longer required
@@ -307,12 +308,15 @@ if [ -f "${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.i
    # Publish the output of diffoscope, there are differences
    cp -a ${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html ${PAGE}
    save_artifacts debian_live_build ${CONFIGURATION} https://wiki.debian.org/ReproducibleInstalls/LiveImages
+   output_echo "Warning: diffoscope detected differences in the images"
 else
    if [ "$RESULT" != "0" ] ; then
       echo "${DIFFOSCOPE} for ${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) returned error code ${RESULT}" > ${PAGE}
       save_artifacts debian_live_build ${CONFIGURATION} https://wiki.debian.org/ReproducibleInstalls/LiveImages
+      output_echo "Warning: diffoscope returned error code {$RESULT}"
    else
       echo "${PROJECTNAME} in configuration ${CONFIGURATION} with timestamp ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP}) is reproducible" > ${PAGE}
+      output_echo "Info: no differences found"
    fi
 fi
 publish_page debian_live_build
@@ -321,6 +325,5 @@ cleanup success
 # Turn off the trap
 trap - INT TERM EXIT
 
-output_echo "the end, diffoscope has returned ${RESULT}."
-# Return with the status of diffoscope
-exit ${RESULT}
+# We reached the end, return with PASS
+exit 0


=====================================
logparse/reproducible.rules
=====================================
@@ -36,3 +36,11 @@ warning /Warning: Problems analysing/
 warning /Warning: .+ .xiting cleanly as this is out-of-scope./
 warning /Warning: Cannot determine diffoscope version in Debian, aborting./
 
+# Warnings from reproducible_debian_live_build.sh
+warning /Warning: lb .+ failed with/
+warning /Warning: diffoscope detected differences in the images/
+warning /Warning: diffoscope returned error code/
+error /Error: Bad argument/
+info /Info: using live-build from git/
+info /Info: using the snapshot from/
+info /Info: no differences found/



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/b67134243fd20f0e6d391867f9c81d847cf4d779...b984f8e4013681a86211d7177f34837b9f3fe042

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/b67134243fd20f0e6d391867f9c81d847cf4d779...b984f8e4013681a86211d7177f34837b9f3fe042
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/20210827/d7e4686c/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list