X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/eff4781459c0eec46977471b3d3952b053f6cb59..a78d9bf85e4e91b05abc18852c06e3ba65aff0aa:/cgi-bin/eximstatus.pl diff --git a/cgi-bin/eximstatus.pl b/cgi-bin/eximstatus.pl index 33b6d24..0184ae8 100755 --- a/cgi-bin/eximstatus.pl +++ b/cgi-bin/eximstatus.pl @@ -568,6 +568,19 @@ EOMAIL $fh->close; +use HTTP::Tiny; +use JSON::PP; +HTTP::Tiny->new(timeout => 5)->post( + 'http://127.0.0.1:2567/api/message', { + headers => {'content-type' => 'application/json'}, + content => encode_json({ + gateway => 'exim-builds', + username => '', + text => "$animal [$branch]: @{[lc $stat_type]}: @{[lc $stage]}; commit: https://git.exim.org/@{[substr $githeadref, 0, 10]}", + }), + } +); + exit if ($stage eq $prev_stat); $mailto = [@$change_stat]; @@ -605,3 +618,14 @@ For more information, see $url/cgi-bin/show_history.pl?nm=$animal&br=$branch EOMAIL $fh->close; + +HTTP::Tiny->new(timeout => 5)->post( + 'http://127.0.0.1:2567/api/message', { + headers => {'content-type' => 'application/json'}, + content => encode_json({ + gateway => 'exim-builds', + username => '', + text => "$animal [$branch]: status @{[lc $stat_type]}; $url/cgi-bin/show_history.pl?nm=$animal&br=$branch", + }), + } +);