summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 15:15:48 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:08 +0200
commitc841c6c8d07dd78b239506e0500198cfa4ad9382 (patch)
treef32983ea2c555b92ce9b9b31ff561d6d523a6c4a
parentb3f36a1579eabd2b556240fd045fe6ffd5bb33fd (diff)
downloadjenkins.debian.net-c841c6c8d07dd78b239506e0500198cfa4ad9382.tar.xz
reproducible: build: refactor: do something if a reproducible build ends up either having .debbindiff.html or not having .buildinfo
-rwxr-xr-xbin/reproducible_build.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 6248a6b9..362f8bb6 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -109,20 +109,6 @@ handle_ftbfs() {
if [ $SAVE_ARTIFACTS -eq 1 ] ; then SAVE_ARTIFACTS=2 ; fi
}
-handle_reproducible() {
- if [ ! -f ./${DBDREPORT} ] && [ -f b1/${BUILDINFO} ] ; then
- cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1
- figlet ${SRCPACKAGE}
- echo | tee -a ${RBUILDLOG}
- echo "$DBDVERSION found no differences in the changes files, and a .buildinfo file also exists." | tee -a ${RBUILDLOG}
- echo "${SRCPACKAGE} built successfully and reproducibly." | tee -a ${RBUILDLOG}
- calculate_build_duration
- sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '${VERSION}', 'reproducible', '$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}', 'reproducible', '${DATE}', '${DURATION}')"
- update_db_and_html
- fi
-}
-
handle_ftbr() {
echo | tee -a ${RBUILDLOG}
echo -n "$(date) - ${SRCPACKAGE} failed to build reproducibly in ${SUITE} on ${ARCH} " | tee -a ${RBUILDLOG}
@@ -146,6 +132,23 @@ handle_ftbr() {
fi
}
+handle_reproducible() {
+ if [ ! -f ./${DBDREPORT} ] && [ -f b1/${BUILDINFO} ] ; then
+ cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1
+ figlet ${SRCPACKAGE}
+ echo | tee -a ${RBUILDLOG}
+ echo "$DBDVERSION found no differences in the changes files, and a .buildinfo file also exists." | tee -a ${RBUILDLOG}
+ echo "${SRCPACKAGE} built successfully and reproducibly." | tee -a ${RBUILDLOG}
+ calculate_build_duration
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '${VERSION}', 'reproducible', '$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}', 'reproducible', '${DATE}', '${DURATION}')"
+ update_db_and_html
+ else
+ echo "Debbindiff says the build is reproducible, but either there is a debbindiff file or there is no .buildinfo. Please investigate" | tee -a $RBUILDLOG
+ handle_ftbr
+ 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