[Qa-jenkins-scm] [jenkins.debian.net] 11/12: reproducible: build: refactor: add irc_message() to reduce hardcoding of kgb-client call
Holger Levsen
holger at moszumanska.debian.org
Sat Apr 18 15:44:59 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 4805db3c115ed6a0fcb6f2417b5cd280e8c9aa8e
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Mon Apr 6 15:43:42 2015 +0200
reproducible: build: refactor: add irc_message() to reduce hardcoding of kgb-client call
---
bin/reproducible_build.sh | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index b1020b9..186f934 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
}
--
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