Add ability to detect HTTP_PROXY or HTTPS_PROXY in environment and pass it along to ivy

Review Request #1877 — Created March 6, 2015 and submitted

zundel
pants
zundel/add-http-proxy
1216
77fbc77...
pants-reviews
benjyw, jsirois, stuhood
Add ability to detect HTTP_PROXY or HTTPS_PROXY in environment and pass it along to ivy

Added unit tests.

Using this build I was able to build a project in our repo inside a build environment that was firewalled off with only a proxy to get to the twitter and maven repository.

Without a real proxy you can test this way:

rm -rf ~/.ivy2/pants/org.antlr
export HTTPS_PROXY=https://foo:1234
export HTTP_PROXY=http://bar:567
PANTS_DEV=1 ./pants clean-all
PANTS_DEV=1 ./pants compile examples/src/java/com/pants/examples/antlr4 -ldebug

The build will fail, but you can inspect the output and system properties are being passed down to ivy.

ZU
ZU
  1. Some discussion on this RB is taking placce in https://rbcommons.com/s/twitter/r/1874/

  2. 
      
ZU
JS
  1. 
      
  2. src/python/pants/ivy/bootstrapper.py (Diff revision 3)
     
     
    Prefer the libs for this: https://docs.python.org/2/library/urlparse.html#urlparse.urlparse
    
    The url* stuff got moved around in py3 though so accessing via six is best: http://pythonhosted.org/six/#module-six.moves
  3. 
      
ZU
JS
  1. Ship It!
  2. 
      
ZU
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks for the review John. Commit 97d7def

Loading...