[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Use a different folder for the results, that is accessible from the schroot
Holger Levsen (@holger)
gitlab at salsa.debian.org
Fri Jun 25 16:25:36 BST 2021
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
dbc9471d by Roland Clobus at 2021-06-25T17:25:18+02:00
Use a different folder for the results, that is accessible from the schroot
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_debian_live_build.sh
Changes:
=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -24,6 +24,8 @@ output_echo() {
cleanup() {
# Cleanup the workspace
sudo rm -rf --one-file-system /srv/workspace/live-build
+ # Cleanup the results
+ rm -rf --one-file-system /srv/reproducible-results/live-build-*
}
#
@@ -37,17 +39,18 @@ trap cleanup INT TERM EXIT
export PROJECTNAME="live-build"
export CONFIGURATION="smallest-build"
mkdir -p /srv/workspace/live-build
-export TMPDIR=$(mktemp --tmpdir=/srv/workspace/live-build -d -t ${CONFIGURATION}.XXXXXXXX)
-cd ${TMPDIR}
+export BUILDDIR=$(mktemp --tmpdir=/srv/workspace/live-build -d -t ${CONFIGURATION}.XXXXXXXX)
+cd ${BUILDDIR}
+export RESULTSDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t ${PROJECTNAME}-${CONFIGURATION}-XXXXXXXX) # accessible in schroots, used to compare results
# Fetch and use the latest version of live build
-export LIVE_BUILD=${TMPDIR}/latest-live-build
+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)"
popd
-export LB_OUTPUT=${TMPDIR}/lb_output.txt
+export LB_OUTPUT=${RESULTSDIR}/lb_output.txt
# Use 'now' as the basic timestamp
export SOURCE_DATE_EPOCH=$(date +%s)
@@ -219,8 +222,8 @@ if [ "$RESULT" != "0" ] ; then
fi
# Move the image away
-mkdir -p ${TMPDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
-mv live-image-amd64.hybrid.iso ${TMPDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
+mkdir -p ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
+mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
# Clean for the second build
sudo lb clean --purge | tee -a $LB_OUTPUT
@@ -240,8 +243,8 @@ if [ "$RESULT" != "0" ] ; then
fi
# Move the image away
-mkdir -p ${TMPDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
-mv live-image-amd64.hybrid.iso ${TMPDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
+mkdir -p ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
+mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
# Clean up
sudo lb clean --purge | tee -a $LB_OUTPUT
@@ -256,13 +259,16 @@ cd ..
# Compare the images
TIMEOUT="30m"
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
+TMPDIR=${RESULTSDIR}
call_diffoscope ${PROJECTNAME} ${CONFIGURATION}/live-image-amd64.hybrid.iso
-if [ ! -f "${TMPDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html" ] ; then
+# List the content of the results directory
+tree ${RESULTSDIR}
+if [ ! -f "${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html" ] ; then
output_echo "Error: diffoscope failed, no output available"
fi
# Publish the output of diffoscope
PAGE=live-image-amd64.hybrid.iso.html
-cp -a ${TMPDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html ${PAGE}
+cp -a ${RESULTSDIR}/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso.html ${PAGE}
publish_page debian_live_build
cleanup success
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/dbc9471d1d878ae96b57bf56e4c12deb552e8759
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/dbc9471d1d878ae96b57bf56e4c12deb552e8759
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/df352e6f/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list