summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 15:43:42 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:08 +0200
commit4805db3c115ed6a0fcb6f2417b5cd280e8c9aa8e (patch)
tree16df561afcaaca3c99de6ede4256d08f763d5e6f
parent2f7824f9763892225fefa9a8141f631f7a6a4bdf (diff)
downloadjenkins.debian.net-4805db3c115ed6a0fcb6f2417b5cd280e8c9aa8e.tar.xz
reproducible: build: refactor: add irc_message() to reduce hardcoding of kgb-client call
-rwxr-xr-xbin/reproducible_build.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index b1020b9f..186f934f 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -17,6 +17,12 @@ ARCH="amd64"
# sleep 1-12 secs to randomize start times
/bin/sleep $(echo "scale=1 ; $(shuf -i 1-120 -n 1)/10" | bc )
+irc_message() {
+ local MESSAGE="$@"
+ kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job
+}
+
+
create_results_dirs() {
mkdir -p /var/lib/jenkins/userContent/dbd/${SUITE}/${ARCH}
mkdir -p /var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}
@@ -45,10 +51,10 @@ cleanup_all() {
if [ $SAVE_ARTIFACTS -eq 3 ] ; then
MESSAGE="$MESSAGE, $DBDVERSION had troubles with these..."
fi
- kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job
+ irc_message "$MESSAGE"
elif [ $SAVE_ARTIFACTS -eq 2 ] ; then
echo "No artifacts were saved for this build." | tee -a ${RBUILDLOG}
- kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "Check $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log to find out why no artifacts were saved." || true # don't fail the whole job
+ irc_message "Check $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log to find out why no artifacts were saved."
fi
rm -r $TMPDIR
}
@@ -128,7 +134,7 @@ handle_ftbr() {
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
+ # irc_message "$MESSAGE"
fi
}