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;
}
my $logst = <<EOSQL;
insert into build_status
- (sysname, snapshot,status, stage, log,conf_sum, branch,
+ (sysname, snapshot, status, stage, log, conf_sum, branch,
changed_this_run, changed_since_success,
- log_archive_filenames , log_archive, build_flags, scm, scmurl,
- git_head_ref,frozen_conf)
+ log_archive_filenames, log_archive, build_flags, scm, scmurl,
+ git_head_ref, frozen_conf)
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
EOSQL
;
$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];
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",
+ }),
+ }
+);