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_plugin resource does not respect :cli_credential_file #778

Open
mromero-convoso opened this issue Dec 14, 2021 · 0 comments
Open

Comments

@mromero-convoso
Copy link

👻 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.

🥞 Cookbook version

9.5.0

👩‍🍳 Chef-Infra Version

17.8.25

🎩 Platform details

Ubuntu 20.04 LTS

Steps To Reproduce

Steps to reproduce the behavior:

  1. 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

node.run_state[:cli_credential_file] = ::File.join(Chef::Config[:file_cache_path], 'creds')

jenkins_plugin <some plugin> do
  action  :install
  version <some version>
  install_deps false
end

The install will attempt to install the plugin without specifying -auth @<creds file> in the args to jenkins-cli

🚓 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.

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

No branches or pull requests

1 participant