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

Proxy work #202

Merged
merged 4 commits into from
Oct 15, 2014
Merged

Proxy work #202

merged 4 commits into from
Oct 15, 2014

Conversation

trlinkin
Copy link
Contributor

This extends the module's ability to manage proxy configurations. As an added bonus, I've done some clean up and clarity improvements surrounding the ::jenkins::proxy class in general.

The Jenkins proxy configuration supports a whitelist of nodes that will
not use the the proxy when Jenkins (or some plugins) attempts to
communicate. As of right now, this setting will be cleared by Puppet
if any other aspect of the proxy configuration is managed.

This commit adds support for the "No Proxy Whitelist" by adding a new
parameter to the `jenkins` class. The new parameter, `no_proxy_list`,
will accept an array of hostname patterns to no longer use the proxy to
access. The `no_proxy_list` parameter is optional and will default to
`undef`.
This commit adds tests to verify the behaviour of the `no_proxy_list`
parameter on the `::jenkins` class. The tests verify what happens when
the parameter is set and unset.
Without this commit, the template referenced by the class
`::jenkins::proxy` was using the `lookupvar()` method in the ERB
tags to access variables from other class scopes. This method of
accessing the variables is at the mercy of changes to Puppet's internal
Ruby API. This method is also not very clear as to what is happening
without having to read through both the class and the template.

This commit changes the method of variable access to use a simple
variable assignment operation in the Puppet DSL to bring the values of
the required variables into the local scope. This is preferred as it
makes the template easier to read and keeps the template's operations
relative to the place from where it is called. In the Puppet code
itself, it is now more clear as to what data is used by the
`::jenkins::proxy` class and where that data is coming from.
@@ -100,6 +100,7 @@
$install_java = $jenkins::params::install_java,
$proxy_host = undef,
$proxy_port = undef,
$no_proxy_list = undef,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you add some PuppetDoc above for this parameter?

@rtyler
Copy link

rtyler commented Oct 14, 2014

For the most part this looks good to me, I'll wait for the @buildhive comment and some docs and then it should be good to go

@rtyler rtyler added this to the 1.3.0 - Bernard milestone Oct 14, 2014
@jenkinsadmin
Copy link

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@trlinkin
Copy link
Contributor Author

Docs added in commit above ☝️

rtyler pushed a commit that referenced this pull request Oct 15, 2014
@rtyler rtyler merged commit 6411d6b into voxpupuli:master Oct 15, 2014
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 this pull request may close these issues.

3 participants