Closed schisamo closed 10 years ago
I was able to recreate locally with the following tweak to my .kitchen.yml
:
diff --git a/.kitchen.yml b/.kitchen.yml
index 4c8fd97..710a225 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -63,6 +63,10 @@ suites:
#
- name: jenkins_credentials_create
run_list: jenkins_credentials::create
+ attributes:
+ jenkins:
+ master:
+ version: 1.532-1.1
- name: jenkins_credentials_delete
run_list: jenkins_credentials::delete
Issue appears to be related to a downlevel version of the credentials
plugin that ships with Jenkins 1.532-1.1. This version of Jenkins ships with credentials
1.4 which does not contain the class com.cloudbees.plugins.credentials.domains.SchemeRequirement
. This class was first introduced with credentials
1.5: https://github.com/jenkinsci/credentials-plugin/commit/ea696cb21bc84bbe756334ef818450405432410a
credentials
1.5 began shipping with Jenkins 1.536+: https://github.com/jenkinsci/jenkins/commit/2f846ea9a0c0714402c248c103b1d10c7fdb101f
Comment so I can get updates.
Looks like a bit of a chicken and egg problem for me then. If I can get the plugin upgrade working, then it sounds like this should work as well. I probably won't have time to test until Saturday but I'll see what happens if I manually upgrade the plugin and then use the credentials resource.
it seems like there should be a sentinel around the credentials resource that blocks the execution attempt if the minimum plugin version isn't available and emits a warning.
@schisamo well that explains why we weren't seeing this behavior in our tests. I think we have to raise an error, since future command are likely to fail.
@schisamo @yzl talked about this in standup today. I don't think it's unreasonable to add a caveat to the README about this. Just like we require a minimum version or Ruby and Chef, we can require people manually install this plugin if they want to manage credentials.
@sethvargo As a consumer of this cookbook, I think that's reasonable with the caveat that the jenkins_plugin resource (#122) should be able to handle upgrading said plugin.
@tucker-altiscale well... in recent versions of Jenkins, credentials is one of those "core" plugins
@sethvargo I believe the credentials plugin is core for the LTS version of Jenkins as well. The issue is that upgrading a Jenkins plugin doesn't seem to be working, correct? That means that anyone using this cookbook and the LTS version of Jenkins has to have a different bootstrap recipe than they have for the long running service (append something to the run_list after launch and some hand configuration). It's not an unthinkable work flow but it's obviously not ideal. As I don't see many others chiming in, perhaps we're in the extreme minority with using the LTS version.
Issue originally reported by Tucker on the Chef mailing list: http://lists.opscode.com/sympa/arc/chef/2014-01/msg00219.html
Attempting to create credentials using the
jenkins_private_key_credentials
resource ends in the following exception:Full Chef output available here: https://gist.github.com/tucker-altiscale/6d31f71f425e66a3ad83
Issue reported on Jenkins 1.532-1.1 installed from packages on CentOS.