[Qa-jenkins-scm] [jenkins.debian.net] 06/12: 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
Holger Levsen
holger at moszumanska.debian.org
Sat Apr 18 15:44:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit b3f36a1579eabd2b556240fd045fe6ffd5bb33fd
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Mon Apr 6 15:10:58 2015 +0200
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
---
bin/reproducible_build.sh | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index cfe05de..6248a6b 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
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list