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

Jenkins server needs to honor https?_proxy vars set by Juju #31

Open
johnsca opened this issue Feb 9, 2017 · 1 comment · May be fixed by #41
Open

Jenkins server needs to honor https?_proxy vars set by Juju #31

johnsca opened this issue Feb 9, 2017 · 1 comment · May be fixed by #41

Comments

@johnsca
Copy link
Contributor

johnsca commented Feb 9, 2017

If Juju is configured to use a proxy, it will set the env vars for the charm context, but these won't be automatically carried over to the Jenkins server running as the jenkins user.

@kwmonroe
Copy link

Seems fixable by rendering a /var/lib/jenkins/proxy.xml template. This is what gets created when you add proxy info via the Jenkins UI Manage Jenkins -> Manage Plugins -> Advanced:

$ cat /var/lib/jenkins/proxy.xml
<?xml version='1.0' encoding='UTF-8'?>
<proxy>
  <name>my.proxy.url</name>
  <port>3128</port>
  <noProxyHost>10.55.60.207
127.0.0.1
::1</noProxyHost>
  <secretPassword>{AQAAABAAAAAQ0egWJilzTsMFBMlDf1myuboc8NDxwQRMuzPesmq5u2g=}</secretPassword>
</proxy>

These values came from a proxied jenkins deployment with [http|https|no]_proxy data from the ~/.juju-proxy file on the unit. I didn't set a password for the proxy, so I'm assuming the secretPassword value is some sort of salted/hashed representation of an empty string. I don't have an env with a proxy that requires creds, so I'm not sure how the charm should encode that value if present.

Alternatively, this could also be handled by setting the following in /etc/default/jenkins:

JAVA_ARGS="-Dhttp.proxyHost=my.proxy.url -Dhttp.proxyPort=3128

I don't like this as much because users won't see this info if they go poking around Manage Plugins -> Advanced in the Jenkins UI, nor do I know what the -D should be for no-proxy bits...

Just my $0.02 on possible fixes.

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

Successfully merging a pull request may close this issue.

2 participants