summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhooks/post-receive.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/hooks/post-receive.lua b/hooks/post-receive.lua
new file mode 100755
index 0000000..89c9537
--- /dev/null
+++ b/hooks/post-receive.lua
@@ -0,0 +1,11 @@
+#!/usr/bin/lua
+local _, updates = ...
+if updates["refs/heads/master"] then
+ log.state("Notifying CI system, please hold...")
+ local code, msg, headers, body = fetch("https://ci1.liw.fi/projects/ick.liw.fi/pipelines/build/+trigger")
+ if code == "200" then
+ log.state("CI triggered")
+ else
+ log.warn("CI not triggered, received HTTP code " .. code)
+ end
+end