summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-01-16 16:20:48 +0200
committerLars Wirzenius <liw@liw.fi>2018-01-16 16:20:48 +0200
commit189b9f6f93c61b4f23537b851fdd31c4acdba7b0 (patch)
tree0c663757b28842c995b38a29da67e5cf12d01159
parent94abfe9c74ff486be66cc0c696e322ca119d49c3 (diff)
downloadbugs-liw-fi-distix-admin.tar.gz
Add: hook to trigger CIadmin
-rwxr-xr-xhooks/post-receive.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/hooks/post-receive.lua b/hooks/post-receive.lua
new file mode 100755
index 000000000..81e8f069d
--- /dev/null
+++ b/hooks/post-receive.lua
@@ -0,0 +1,10 @@
+local _, updates = ...
+if updates["refs/heads/master"] then
+ log.state("Notifying CI system, please hold...")
+ local code, msg, headers, body = fetch("https://ci2.liw.fi/projects/bugs@liw.fi/pipelines/distix_html/+trigger")
+ if code == "200" then
+ log.state("CI triggered")
+ else
+ log.warn("CI not triggered, received HTTP code " .. code)
+ end
+end