#!/usr/bin/perl use strict; use DBI; use Template; use CGI; use vars qw($dbhost $dbname $dbuser $dbpass $dbport); require "$ENV{BFConfDir}/BuildFarmWeb.pl"; my $query = new CGI; my @members = $query->param('member'); my $dsn="dbi:Pg:dbname=$dbname"; $dsn .= ";host=$dbhost" if $dbhost; $dsn .= ";port=$dbport" if $dbport; my $db = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!"); # there is possibly some redundancy in this query, but it makes # a lot of the processing simpler. my $statement = < now() - '30 days'::interval ) m where name = sysname and s.status = 'approved' order by case when branch = 'HEAD' then 0 else 1 end, branch desc, snapshot desc EOS ; my $statrows=[]; my $sth=$db->prepare($statement); $sth->execute; while (my $row = $sth->fetchrow_hashref) { next if (@members && ! grep {$_ eq $row->{sysname} } @members); $row->{build_flags} =~ s/^\{(.*)\}$/$1/; $row->{build_flags} =~ s/,/ /g; $row->{build_flags} =~ s/--((enable|with)-)?//g; $row->{build_flags} =~ s/\S+=\S+//g; push(@$statrows,$row); } $sth->finish; $db->disconnect; my $template = new Template({}); print "Content-Type: text/html\n\n"; $template->process(\*DATA,{statrows=>$statrows}); exit; =comment [%- BLOCK img ; flag ; END -%] [%- BLOCK imgx ; IF flag_imgs.$flag ; '' . flag . ' ' ; ELSE flag . ' ' ; END ; END -%] =cut __DATA__ [% flag_imgs = { perl = '/img/camel.png', python = '/img/python.png', debug = '/img/bug.png', pam => '/img/pam.png', cassert => '/img/cassert.png', openssl => '/img/ssl_icon.gif', nls => '/img/translateicon.gif', krb5 => '/img/krb.gif', tcl => '/img/tcl.png', 'thread-safety' => '/img/threads.gif', 'integer-datetimes' = '/img/days.png', } -%] [%- BLOCK img ; IF flag == 'blank' %] [% ELSIF flag_imgs.$flag %][% flag %] [% ELSE %][%# flag ; ' ' %][% END ; END -%] [%- BLOCK cl %] class=" [% SWITCH bgfor -%] [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]" [%- END -%] PostgreSQL BuildFarm Status

PostgreSQL BuildFarm Status

Shown here is the latest status of each farm member for each branch it has reported on in the last 30 days.

Use the farm member link for history of that member on the relevant branch.

[% FOREACH flagset IN flag_imgs %] [% IF loop.count == 6 %][% END %] [% END %]
Legend[% flagset.key %] = [% flagset.key %]

[% brch = "" %] [% FOREACH row IN statrows %] [% IF row.branch != brch ; brch = row.branch %] [% END %] [% END %]
Branch: [% brch %]
AliasSystemStatusFlags
[% row.sysname %] [% row.operating_system %] [% row.os_version %] [%- row.compiler %] [% row.compiler_version %] [%- row.architecture %] [%- row.when_ago | replace('\s',' ') %] ago  [% row.stage -%] [%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%] [% flags = row.build_flags.split(); FOREACH flagme IN flag_imgs.keys() ; IF flags.grep(flagme).size > 0 ; PROCESS img flag = flagme ; ELSE ; PROCESS img flag = 'blank' ; END; END %]