diff options
Diffstat (limited to 'hooks/post-receive.lua')
-rwxr-xr-x | hooks/post-receive.lua | 10 |
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 |