summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 15:10:58 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:08 +0200
commitb3f36a1579eabd2b556240fd045fe6ffd5bb33fd (patch)
treee11563c7449dd00db2a14586939c114236b41a8c /bin
parent074d179e2e47d89d5efc8256fcfb33efd6b615c5 (diff)
downloadjenkins.debian.net-b3f36a1579eabd2b556240fd045fe6ffd5bb33fd.tar.xz
reproducible: build: refactor: slim down the call_debbindiff() function: strip out handle_ftbr(). in all these strips I removed a loads of checks and something broke, let's fix
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh44
1 files changed, 24 insertions, 20 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index cfe05de1..6248a6b9 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -123,6 +123,29 @@ handle_reproducible() {
fi
}
+handle_ftbr() {
+ echo | tee -a ${RBUILDLOG}
+ echo -n "$(date) - ${SRCPACKAGE} failed to build reproducibly in ${SUITE} on ${ARCH} " | tee -a ${RBUILDLOG}
+ cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1 || true
+ if [ -f ./${DBDREPORT} ] ; then
+ echo -n ", $DEBBINDIFFOUT" | tee -a ${RBUILDLOG}
+ mv ./${DBDREPORT} /var/lib/jenkins/userContent/dbd/${SUITE}/${ARCH}/
+ else
+ echo -n ", $DBDVERSION produced no output (which is strange)"
+ fi
+ echo "." | tee -a ${RBUILDLOG}
+ OLD_STATUS=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT status FROM results WHERE package_id='${SRCPKGID}'")
+ calculate_build_duration
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '${VERSION}', 'unreproducible', '$DATE', '$DURATION')"
+ sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration) VALUES ('${SRCPACKAGE}', '${VERSION}', '${SUITE}', '${ARCH}', 'unreproducible', '${DATE}', '${DURATION}')"
+ update_db_and_html
+ if [ "${OLD_STATUS}" = "reproducible" ]; then
+ MESSAGE="status changed from reproducible -> unreproducible. ${REPRODUCIBLE_URL}/${SUITE}/${ARCH}/${SRCPACKAGE}"
+ echo "\n$MESSAGE" | tee -a ${RBUILDLOG}
+ # kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job
+ fi
+}
+
init_debbindiff() {
# the schroot for debbindiff gets updated once a day. wait patiently if that's the case
if [ -f $DBDCHROOT_WRITELOCK ] || [ -f $DBDCHROOT_READLOCK ] ; then
@@ -178,26 +201,7 @@ call_debbindiff() {
SAVE_ARTIFACTS=3
;;
esac
- echo | tee -a ${RBUILDLOG}
- echo -n "$(date) - ${SRCPACKAGE} failed to build reproducibly in ${SUITE} on ${ARCH} " | tee -a ${RBUILDLOG}
- cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1 || true
- if [ -f ./${DBDREPORT} ] ; then
- echo -n ", $DEBBINDIFFOUT" | tee -a ${RBUILDLOG}
- mv ./${DBDREPORT} /var/lib/jenkins/userContent/dbd/${SUITE}/${ARCH}/
- else
- echo -n ", $DBDVERSION produced no output (which is strange)"
- fi
- echo "." | tee -a ${RBUILDLOG}
- OLD_STATUS=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT status FROM results WHERE package_id='${SRCPKGID}'")
- calculate_build_duration
- sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '${VERSION}', 'unreproducible', '$DATE', '$DURATION')"
- sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration) VALUES ('${SRCPACKAGE}', '${VERSION}', '${SUITE}', '${ARCH}', 'unreproducible', '${DATE}', '${DURATION}')"
- update_db_and_html
- if [ "${OLD_STATUS}" = "reproducible" ]; then
- MESSAGE="status changed from reproducible -> unreproducible. ${REPRODUCIBLE_URL}/${SUITE}/${ARCH}/${SRCPACKAGE}"
- echo "\n$MESSAGE" | tee -a ${RBUILDLOG}
- # kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job
- fi
+ handle_ftbr
print_out_duration
}