mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

The access to Jenkins from Stash ignores the proxy configuration in Java system properties #93

Closed hyrrot closed 9 years ago

hyrrot commented 9 years ago

Hello!

Could you please add some support for HTTP proxy to the add-on?

My Stash instance is used in the enterprise network and some destination Jenkins hosts should be accessed via an http proxy. I specify http proxy in Java system properties. (I add -Dhttp.proxyHost=<proxy-hostname> and -Dhttp.proxyPort=<proxy-port-number> to JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh.) In my test I found Jenkins Webhook ignored those proxy configurations and it tried to send HTTP request directly to the Jenkins server.

I would like all the requests by the add-on respect the config, or a new add-on config to toggle the behaviour of sending the trigger (via proxy / directly).

bbaetz commented 9 years ago

I ran into this today too... I think that the fix is just to use SystemDefaultHttpClient instead of DefaultHttpClient in ConcreteHttpClientFactory.java, but I ran out of time to test (and won't be able to get back to this until mid-Jan)