diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-02-26 23:58:35 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-01 14:37:29 +0100 |
commit | 3061ba70b969b9504107ca2d073e9ccf7edf3fe6 (patch) | |
tree | a30604d725e6a1a28f313623461ecdf55cf9758d /bin/reproducible_build.sh | |
parent | baceb316d82eb30cd413204071625f1e2dae4a7f (diff) | |
download | jenkins.debian.net-3061ba70b969b9504107ca2d073e9ccf7edf3fe6.tar.xz |
reproducible: move rbuild files under a suite/arch-named directory, e.g. /rbuild/sid/amd64
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-x | bin/reproducible_build.sh | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 83f542c6..0c28a0ea 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -11,17 +11,21 @@ common_init "$@" # common code defining db access . /srv/jenkins/bin/reproducible_common.sh -# create dirs for results -mkdir -p /var/lib/jenkins/userContent/dbd/ -mkdir -p /var/lib/jenkins/userContent/rbuild/ -mkdir -p /var/lib/jenkins/userContent/buildinfo/ +# support for different architectures (we have actual support only for amd64) +ARCH="amd64" + +create_results_dirs() { + mkdir -p /var/lib/jenkins/userContent/dbd/ + mkdir -p /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH} + mkdir -p /var/lib/jenkins/userContent/buildinfo/ +} cleanup_all() { rm -r $TMPDIR $TMPCFG } cleanup_userContent() { - rm -f /var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1 + rm -f /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_*.rbuild.log > /dev/null 2>&1 rm -f /var/lib/jenkins/userContent/dbd/${SRCPACKAGE}_*.debbindiff.html > /dev/null 2>&1 rm -f /var/lib/jenkins/userContent/buildinfo/${SRCPACKAGE}_*.buildinfo > /dev/null 2>&1 } @@ -78,7 +82,7 @@ call_debbindiff() { elif [ $RESULT -eq 1 ] ; then DEBBINDIFFOUT="debbindiff found issues, please investigate $REPRODUCIBLE_URL/dbd/${LOGFILE}" elif [ $RESULT -eq 2 ] ; then - DEBBINDIFFOUT="debbindiff had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SRCPACKAGE}_${EVERSION}.rbuild.log" + DEBBINDIFFOUT="debbindiff had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log" fi if [ $RESULT -eq 0 ] && [ ! -f ./${LOGFILE} ] && [ -f b1/${BUILDINFO} ] ; then cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/ > /dev/null 2>&1 @@ -150,8 +154,9 @@ else DURATION=0 # mark build attempt sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');" + create_results_dirs - RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_None.rbuild.log + RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG} echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG} set +e @@ -185,7 +190,7 @@ else TMPLOG=$(mktemp) mv ${RBUILDLOG} ${TMPLOG} cleanup_userContent - RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SRCPACKAGE}_${EVERSION}.rbuild.log + RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log mv ${TMPLOG} ${RBUILDLOG} cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG} # check whether the package is not for us... |