X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/c0243f55aeb2582482d5b934de082431f1afa4e0..a78d9bf85e4e91b05abc18852c06e3ba65aff0aa:/cgi-bin/eximstatus.pl diff --git a/cgi-bin/eximstatus.pl b/cgi-bin/eximstatus.pl index 38a7d96..0184ae8 100755 --- a/cgi-bin/eximstatus.pl +++ b/cgi-bin/eximstatus.pl @@ -192,7 +192,7 @@ if ($log =~/Last file mtime in snapshot: (.*)/) if ($snaptime < ($last_branch_time - 86400)) { print "Status: 493 snapshot too old: $1\nContent-Type: text/plain\n\n"; - print "snapshot to old: $1\n"; + print "snapshot too old: $1\n"; $db->disconnect; exit; } @@ -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", + }), + } +);