Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle proxy setup for Jenkins-CLI #18

Closed
de-jcup opened this issue Nov 7, 2017 · 5 comments
Closed

Handle proxy setup for Jenkins-CLI #18

de-jcup opened this issue Nov 7, 2017 · 5 comments
Assignees
Milestone

Comments

@de-jcup
Copy link
Owner

de-jcup commented Nov 7, 2017

It would be nice if the proxy settings from eclipse would be used by Jenkins-CLI calls aswell.
So in a enterprise network servers inside cloud can be reached without problems.

@de-jcup de-jcup self-assigned this Nov 7, 2017
@de-jcup
Copy link
Owner Author

de-jcup commented Mar 10, 2018

http://blog.vogella.com/2009/12/08/eclipse-rcp-proxy-preference/
in combination with

https://stackoverflow.com/questions/120797/how-do-i-set-the-proxy-to-be-used-by-the-jvm

-Dhttp.proxyHost=10.0.0.100 
-Dhttp.proxyPort=8800
-Dhttp.nonProxyHosts="localhost|127.0.0.1|10.*.*.*|*.foo.com‌​|etc"

But what about password settings etc.?
https://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java

de-jcup added a commit that referenced this issue Mar 10, 2018
- -Dhttp.proxy etc. is created as prefix to -jar 
  but seems currently not working
@de-jcup de-jcup added this to the 1.2.0 milestone Mar 10, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Mar 11, 2018

Hm... standard http proxy settings are not working correct.

Reason seems to be:
https://github.com/jenkinsci/jenkins/blob/master/cli/src/main/java/hudson/cli/CLIConnectionFactory.java
and
https://github.com/jenkinsci/jenkins/blob/master/cli/src/main/java/hudson/cli/CLI.java
...
It seems the CLIConnectionFactory is set bei CLI.java with command line parameter -p ?

@de-jcup
Copy link
Owner Author

de-jcup commented Mar 11, 2018

-Djava.net.useSystemProxies=true must be set... than Jenkins CLI will use the given data!

de-jcup added a commit that referenced this issue Mar 11, 2018
de-jcup added a commit that referenced this issue Mar 11, 2018
- the "-p" option is not necessary, system property settings are
  working now, so removed old code 
- added some tests for hiding passwords
@de-jcup
Copy link
Owner Author

de-jcup commented Mar 11, 2018

Per default the eclipse proxy usage is not enabled, but can be done in Preferences (so behaviour as before is given).
image

@de-jcup de-jcup closed this as completed Apr 4, 2018
@de-jcup
Copy link
Owner Author

de-jcup commented Oct 2, 2018

Just another view for documentation
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant