sous-chefs / jenkins

Development repository for the jenkins cookbook
https://supermarket.chef.io/cookbooks/jenkins
Apache License 2.0
424 stars 635 forks source link

remoting should no longer be the default protocol #722

Closed jayhendren closed 4 years ago

jayhendren commented 5 years ago

This cookbook no longer works out-of-the box with recent versions of Jenkins.

This cookbook sets the remoting protocol as the default protocol for the Jenkins CLI:

https://github.com/chef-cookbooks/jenkins/blob/16650a355ce80c6d6b89b35c4f3239d0eda8ffe8/attributes/executor.rb#L54-L57

This didn't use to be much of a problem, because the remoting protocol was deprecated (i.e. throws a warning) but still supported. However, as of Jenkins 2.165, released in February of this year, the remoting protocol has been removed altogether:

https://jenkins.io/blog/2019/02/17/remoting-cli-removed/

This means it's not possible to use this cookbook with Jenkins 2.165 or later without adjusting the default attributes.

jimbo8098 commented 4 years ago

Yes, since moving to 2.204.1, -remoting is no longer a valid option. You can work around that by setting the [jenkins][executor][protocol] attribute to "http" but I would go so far as to assume that as the default.

Even in doing so, I am still experiencing issues installing plugins due to an error.

No update center data is retrieved yet from: https://updates.jenkins.io/update-center.json. configuration-as-code looks like a short plugin name. Did you mean ‘null’?

Looking into that but meantime just supporting OP.

rolffujino commented 4 years ago

@jimbo8098 I am not sure whether you sorted out this issue for yourself or not, but I have a workaround for the No update data is retrieved yet, please see the code below:

directory "#{node['jenkins']['master']['home']}/updates" do
  owner "#{node['jenkins']['master']['user']}"
  group "#{node['jenkins']['master']['user']}"
  action :create
end
execute "update jenkins update center" do
  command "wget http://updates.jenkins-ci.org/update-center.json -qO- | sed '1d;$d'  > #{node['jenkins']['master']['home']}/updates/default.json"
  user "#{node['jenkins']['master']['user']}"
  group "#{node['jenkins']['master']['user']}"
  creates "#{node['jenkins']['master']['home']}/updates/default.json"
end

This was taken from the following page from back in 2013: https://gist.github.com/rowan-m/1026918