summaryrefslogtreecommitdiff
path: root/hooks/post-receive.lua
blob: a8f84f204fbbcc0047d797bcf27c3a84b3785cf0 (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/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