Search code examples
antseleniumjenkinshttp-proxy

How do I override http_proxy environment variable in Jenkins?


I have the following setup:

Jenkins -> Ant script -> Python script -> Interact with Selenium

I run Jenkins on a windows box. My Jenkins calls an Ant script which calls a python script which interacts with Selenium. The problem I have is that the http_proxy environment variable is defined and points to a proxy, that is intented to access the internet and not my system under test. When I run my Jenkins job I get a error message from the proxy along the lines that he could not access my system under test.

How can I disable the http_proxy in Jenkins so that it won't pass them to Ant -> Python -> Selenium?


Solution

  • Use EnvInject plugin to reset the variable in a build step before you run ANT.