If a Chef recipe is configured with the ":cli_credential_file" setting set in its run state, the "jenkins_plugin" resource will still attempt to invoke jenkins-cli without the appropriate auth file.
:pancakes: Cookbook version
9.5.0
:woman_cook: Chef-Infra Version
17.8.25
:tophat: Platform details
Ubuntu 20.04 LTS
Steps To Reproduce
Steps to reproduce the behavior:
With authentication configured in some manner beyond the default, place the following snippet within a recipe.
file ::File.join(Chef::Config[:file_cache_path], 'creds') do
content "jenkinsmgr:somepassword"
mode '0644'
owner 'jenkins'
group 'jenkins'
sensitive true
end
jenkins_plugin do
action :install
version
install_deps false
end
The install will attempt to install the plugin without specifying `-auth @<creds file>` in the args to jenkins-cli
## :police_car: Expected behavior
Expect that jenkins_plugin respects the `:cli_credential_file` variable, when set, similar to how the jenkins_script resource does. There are perhaps other resources that will need to be examined for support for `:cli_credential_file` as well.
:ghost: Brief Description
If a Chef recipe is configured with the ":cli_credential_file" setting set in its run state, the "jenkins_plugin" resource will still attempt to invoke jenkins-cli without the appropriate auth file.
:pancakes: Cookbook version
9.5.0
:woman_cook: Chef-Infra Version
17.8.25
:tophat: Platform details
Ubuntu 20.04 LTS
Steps To Reproduce
Steps to reproduce the behavior:
node.run_state[:cli_credential_file] = ::File.join(Chef::Config[:file_cache_path], 'creds')
jenkins_plugin do
action :install
version
install_deps false
end