summaryrefslogtreecommitdiff
path: root/hooks/post-receive.lua
blob: 81e8f069d7bb3c22101acd4b7238fac086672f06 (plain)
1
2
3
4
5
6
7
8
9
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