Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Examples scripts for notifications via email (git hooks)

  • Loading branch information...
commit a9f3db46acaac7636baaf1016af96c71e5583802 1 parent 3e05963
@antono antono authored defunkt committed
Showing with 44 additions and 0 deletions.
  1. +22 −0 examples/build-failed
  2. +22 −0 examples/build-worked
View
22 examples/build-failed
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Put this file to $PROJECT/.git/hooks/ for email notifications.
+#
+# You should have mail command provided by mailutils package on Debian
+# based systems.
+#
+# sudo apt-get install mailutils
+#
+# You should have mail server running
+#
+# Do not forget: chmod +x build-failed
+#
+echo "
+Visit http://ci.example.org/ for details
+
+Author: $AUTHOR
+Message:
+$MESSAGE
+
+$OUTPUT
+" | mail -s "[example.org] BUILD FAILED $SHA" --to first@gmail.com second@gmail.com
View
22 examples/build-worked
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Put this file to $PROJECT/.git/hooks/ for email notifications.
+#
+# You should have mail command provided by mailutils package on Debian
+# based systems.
+#
+# sudo apt-get install mailutils
+#
+# You should have mail server running
+#
+# Do not forget: chmod +x build-worked
+#
+echo "
+Visit http://ci.example.org/ for details
+
+Author: $AUTHOR
+Message:
+$MESSAGE
+
+" | mail -s "[example.org] build OK" --to first@gmail.com second@gmail.com
+
Please sign in to comment.
Something went wrong with that request. Please try again.