diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-20 11:38:39 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-20 11:38:39 +0100 |
commit | 2731f8dea769094502d9fd89d93a3465c51fd4ae (patch) | |
tree | 5fae8e8fa777b26dd70a869b942a73175e5bf98d | |
parent | fb92c10f0cf8ff83d1192ecdfd51510a3669c629 (diff) | |
download | ick.liw.fi-2731f8dea769094502d9fd89d93a3465c51fd4ae.tar.gz |
Add: post-receive hook
-rwxr-xr-x | hooks/post-receive.lua | 11 |
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 |