fix organization
[buildfarm-server.git] / trunk / cgi-bin / get_bf_status_soap.pl
diff --git a/trunk/cgi-bin/get_bf_status_soap.pl b/trunk/cgi-bin/get_bf_status_soap.pl
new file mode 100755 (executable)
index 0000000..02059e7
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use lib "/home/community/pgbuildfarm/lib/lib/perl5/site_perl";
+
+use SOAP::Lite +trace;
+
+my $obj = SOAP::Lite
+    ->uri('http://www.pgbuildfarm.org/PGBuildFarm')
+    ->proxy('http://127.0.0.1/cgi-bin/show_status_soap.pl')
+    ->request->header("Host" => "www.pgbuildfarm.org")
+    ;
+
+my $data = $obj->get_status->result;
+my @fields = qw( branch sysname stage status 
+                                 operating_system os_version
+                                 compiler compiler_version architecture
+                                 when_ago snapshot build_flags
+                );
+
+print "Content-Type: text/plain\n\n";
+
+my $head = join (' | ', @fields);
+print $head,"\n";
+
+foreach my $datum (@$data)
+{
+    my $line = join (' | ', @{$datum}{@fields});
+    print $line,"\n";
+}
+