summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-25 21:22:12 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-25 21:22:12 +0200
commit09ce692049a3eb533a3490dbbb249184e9106834 (patch)
treeacd2d2027d2ab30b00b2d99341cba1b09edd0e5f /bin
parent57140505d94a66ac2310023725df3cca93def495 (diff)
downloadjenkins.debian.net-09ce692049a3eb533a3490dbbb249184e9106834.tar.xz
chroot-run: if the debian-edu-doc source package was build, update https://jenkins.debian.net/userContent/debian-edu-doc/ with it's binary packages contents
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chroot-run.sh26
1 files changed, 24 insertions, 2 deletions
diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh
index f38befb9..c92e4b73 100755
--- a/bin/chroot-run.sh
+++ b/bin/chroot-run.sh
@@ -79,6 +79,29 @@ cleanup() {
cp -v $CHROOT_TARGET/tmp/testrun/stats.csv $CURDIR
fi
+ #
+ # special case debian-edu-doc
+ #
+ CHANGES=$(cd $CHROOT_TARGET/tmp/ ; ls -1 debian-edu-doc_*.changes 2>/dev/null|| true)
+ if [ ! -z "$CHANGES" ] ; then
+ echo "Extracting contents from .deb files..."
+ cd $CHROOT_TARGET/tmp/
+ NEWDOC=$(mktemp -d)
+ for DEB in $(dcmd --deb $CHANGES) ; do
+ dpkg --extract $DEB $NEWDOC 2>/dev/null
+ done
+ EDUDOC="/var/lib/jenkins/userContent/debian-edu-doc"
+ rm -rf $EDUDOC
+ mkdir $EDUDOC
+ mv $NEWDOC/usr/share/doc/debian-edu-doc-* $EDUDOC/
+ rm -r $NEWDOC
+ MESSAGE="https://jenkins.debian.net/userContent/debian-edu-doc/ has been updated."
+ kgb-client --conf /srv/jenkins/kgb/debian-edu.conf --relay-msg "$MESSAGE"
+ echo
+ echo $MESSAGE
+ echo
+ fi
+
if [ -d $CHROOT_TARGET/proc ]; then
sudo umount -l $CHROOT_TARGET/proc || fuser -mv $CHROOT_TARGET/proc
fi
@@ -117,7 +140,6 @@ EOF
bootstrap
run "$@"
-cleanup
-
trap - INT TERM EXIT
+cleanup