]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
ts-coverity-upload: Honour HttpProxy (or CoverityHttpProxy)
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 19 Oct 2016 13:00:15 +0000 (13:00 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 19 Oct 2016 14:55:59 +0000 (15:55 +0100)
In the Xen Project colo, we do not grant our hosts (including the
controller) general internet access.

We did have the IP address of scan.coverity.com configured in our
firewall.  But Coverity use a CDN now and the IP address is not even
slightly stable any more.

Using the squid works (using CONNECT).  So do that.

I have not been able to test this end-to-end, since I didn't want to
do a real upload.  However I have c&p the command line that
ts-coverity-upload now attempts, and modified it slightly, and
verified that it then manages to get the appropriate 401 error from
scan.coverity.com.

Deployment note: Sites doing Coverity uploads who have an http proxy
configured but which do not want to use it for these uploads need to
set the config option CoverityHttpProxy to the empty value.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
ts-coverity-upload

index 219c8be7ebbe63b572bb0e3c28d93d2431e876ba..94c7e71e73b781ce89f7a8c0383454570cd233e3 100755 (executable)
@@ -43,6 +43,9 @@ sub upload() {
 
     my @args = map { ("--form", $_) } @form_args;
 
+    my $proxy = $c{CoverityHttpProxy} // $c{HttpProxy};
+    push @args, qw(-x), $proxy if $proxy;
+
     push @args, qw(--max-time 7200);
     push @args, qw(--fail); # turn 404 etc into a failure.
     push @args, $r{coverity_submit_url};