=cut
use strict;
+use URI::Escape;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$all_stat $fail_stat $change_stat $green_stat
use Time::ParseDate;
use Storable qw(thaw);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-my $buildlogs = "$ENV{BFConfDir}/buildlogs";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
+
+my $buildlogs = "$RealBin/../buildlogs";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
my $content =
- "branch=$branch&res=$res&stage=$stage&animal=$animal&".
+ 'branch=' . uri_escape($branch) . "&res=$res&stage=$stage&animal=$animal&".
"ts=$ts&log=$log&conf=$conf";
my $extra_content =
chomp $githeadref;
close $githead;
}
- # unlink $archname;
+ unlink $archname;
}
my $config_flags;
@config_flags = grep {! m/=/ } @config_flags;
map {s/\s+//g; $_=qq("$_"); } @config_flags;
push @config_flags,'git' if $client_conf->{scm} eq 'git';
+ push(@config_flags, 'doc')
+ if (defined $client_conf->{'optional_steps'}->{'make-doc'});
+ push(@config_flags, 'test')
+ if (defined $client_conf->{'optional_steps'}->{'test'});
$config_flags = '{' . join(',',@config_flags) . '}' ;
}
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
;
$db->do("insert into dashboard_mat select * from dashboard_mat_data");
$db->commit;
-if ($stage ne 'OK')
-{
- $db->begin_work;
- # prevent occasional duplication by forcing serialization of this operation
- $db->do("lock table nrecent_failures in share row exclusive mode");
- $db->do("delete from nrecent_failures");
- $db->do("insert into nrecent_failures select bs.sysname, bs.snapshot, bs.branch from build_status bs where bs.stage <> 'OK' and bs.snapshot > now() - interval '90 days'");
- $db->commit;
-}
+
+#if ($stage ne 'OK') # On Exim build farm nrecent_failures is a view, not table... comment out
+#{
+# $db->begin_work;
+# # prevent occasional duplication by forcing serialization of this operation
+# $db->do("lock table nrecent_failures in share row exclusive mode");
+# $db->do("delete from nrecent_failures");
+# $db->do("insert into nrecent_failures select bs.sysname, bs.snapshot, bs.branch from build_status bs where bs.stage <> 'OK' and bs.snapshot > now() - interval '90 days'");
+# $db->commit;
+#}
$db->disconnect;