Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/etc
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-07-17 19:47:20 +0400
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-07-17 19:47:20 +0400
commit035dbcfd3f84f6e7abdc4f6dfa28f5755bcde961 (patch)
tree92159f9d4404c619676ce31b506c92b4d2be75fb /src/etc
parent0e31e21ed8948c60fa5895e942fafc72895b2110 (diff)
Add new kind of hooks: bulk hooks right now support start/stop
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/poudriere.d/hooks/Makefile3
-rw-r--r--src/etc/poudriere.d/hooks/bulk.sh.sample33
2 files changed, 35 insertions, 1 deletions
diff --git a/src/etc/poudriere.d/hooks/Makefile b/src/etc/poudriere.d/hooks/Makefile
index 2f476319..392f8e57 100644
--- a/src/etc/poudriere.d/hooks/Makefile
+++ b/src/etc/poudriere.d/hooks/Makefile
@@ -3,7 +3,8 @@ NO_OBJ= yes
PREFIX?= /usr/local
FILESDIR?= ${PREFIX}/etc/poudriere.d/hooks/
-FILES= pkgbuild.sh.sample
+FILES= pkgbuild.sh.sample \
+ bulk.sh.sample
beforeinstall:
mkdir -p ${FILESDIR}
diff --git a/src/etc/poudriere.d/hooks/bulk.sh.sample b/src/etc/poudriere.d/hooks/bulk.sh.sample
new file mode 100644
index 00000000..372cf5fa
--- /dev/null
+++ b/src/etc/poudriere.d/hooks/bulk.sh.sample
@@ -0,0 +1,33 @@
+#!/bin/sh
+# /usr/local/etc/poudriere.d/hooks/bulk.sh
+
+EMAIL_FROM=an@address.com
+EMAIL_TO=another@address.com
+
+status="$1"
+
+if [ "$status" = "start" ]; then
+ mail_subject="[${MASTERNAME}] bulk started on `hostname`"
+
+ sendmail -f ${EMAIL_FROM} ${EMAIL_TO} << EOF
+To: ${EMAIL_TO}
+Subject: ${mail_subject}
+
+Build URL: ${URL_BASE}/${POUDRIERE_BUILD_TYPE}/${MASTERNAME}/${BUILDNAME}
+EOF
+
+fi
+
+if [ "$status" = "done" ]; then
+ mail_subject="[RELEASE - ${MASTERNAME}] bulk done on `hostname`"
+
+ sendmail -f ${EMAIL_FROM} ${EMAIL_TO} << EOF
+To: ${EMAIL_TO}
+Subject: ${mail_subject}
+
+Build URL: ${URL_BASE}/${POUDRIERE_BUILD_TYPE}/${MASTERNAME}/${BUILDNAME}
+EOF
+
+fi
+
+exit 0