diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-06 16:15:28 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-18 17:20:08 +0200 |
commit | d4c709135a4d437a0168733f9a2e7a1d05b7897d (patch) | |
tree | e2c6cbc2bcdb6bd8022cdff32c51c807620e9e2c | |
parent | c63e8c157a0144ada488f0d7d5538bd77c09ba20 (diff) | |
download | jenkins.debian.net-d4c709135a4d437a0168733f9a2e7a1d05b7897d.tar.xz |
reproducible: build: refactor: better handling of FTBR reasons
-rwxr-xr-x | bin/reproducible_build.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 134ce47e..ebc73a7a 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -116,16 +116,19 @@ handle_ftbfs() { } handle_ftbr() { + # a ftbr explaination message could be passed + local FTBRmessage="$@" echo | tee -a ${RBUILDLOG} - echo -n "$(date) - ${SRCPACKAGE} failed to build reproducibly in ${SUITE} on ${ARCH}" | tee -a ${RBUILDLOG} + echo "$(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 # will fail if there is no .buildinfo + if [ ! -z "$FTRmessage" ] ; then + echo "${FTBRmessage}." | tee -a ${RBUILDLOG} + fi 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)" + echo "$DBDVERSION produced no output (which is strange)." | tee -a $RBUILDLOG fi - echo "." | 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}', '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}')" @@ -210,20 +213,18 @@ call_debbindiff() { 0) handle_reproducible 1) - DEBBINDIFFOUT="$DBDVERSION found issues, please investigate $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${DBDREPORT}" - handle_ftbr + handle_ftbr "$DBDVERSION found issues, please investigate $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${DBDREPORT}" ;; 2) - DEBBINDIFFOUT="$DBDVERSION had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log" SAVE_ARTIFACTS=3 - handle_ftbr + handle_ftbr "$DBDVERSION had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log" ;; 124) dbd_timeout ;; *) - DEBBINDIFFOUT="Something weird with $DBDVERSION happened and I don't know how to handle it. Check out $BUILDLOG and $REPRODUCIBLE_URL/$SUITE/$ARCH/$SRCPACKAGE and investigate manually" - handle_ftbr + handle_ftbr "Something weird with $DBDVERSION (exit with $RESULT) happened and I don't know how to handle it" + irc_message "Something weird with $DBDVERSION (exit with $RESULT) happened and I don't know how to handle it. Check out $BUILDLOG and $REPRODUCIBLE_URL/$SUITE/$ARCH/$SRCPACKAGE and investigate manually" ;; esac print_out_duration |