use URL for Git repo if it's a git build
[buildfarm-server.git] / cgi-bin / get_bf_status_soap.pl
1 #!/usr/bin/perl
2
3 use lib "/home/community/pgbuildfarm/lib/lib/perl5/site_perl";
4
5 use SOAP::Lite +trace;
6
7 my $obj = SOAP::Lite
8     ->uri('http://www.pgbuildfarm.org/PGBuildFarm')
9     ->proxy('http://127.0.0.1/cgi-bin/show_status_soap.pl')
10     ->request->header("Host" => "www.pgbuildfarm.org")
11     ;
12
13 my $data = $obj->get_status->result;
14 my @fields = qw( branch sysname stage status 
15                                  operating_system os_version
16                                  compiler compiler_version architecture
17                                  when_ago snapshot build_flags
18                  );
19
20 print "Content-Type: text/plain\n\n";
21
22 my $head = join (' | ', @fields);
23 print $head,"\n";
24
25 foreach my $datum (@$data)
26 {
27     my $line = join (' | ', @{$datum}{@fields});
28     print $line,"\n";
29 }
30