-
Notifications
You must be signed in to change notification settings - Fork 565
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
Proxy work #202
Conversation
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, |
There was a problem hiding this comment.
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?
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 |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Docs added in commit above ☝️ |
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.