jenkins: jenkins_plugin code broken due to new -remoting cli change.
Cookbook version
5.0.0
Chef-client version
Chef: 12.19.36
Platform Details
root@ip-192-168-0-228:/home/rightscale/.chef# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Running in AWS.
Scenario:
Plugin installation fails, appears to be due to the cli update that isn’t based on remoting, announced today here: https://jenkins.io/blog/2017/04/26/security-advisory/
---- Begin output of "/usr/lib/jvm/java-8-openjdk-amd64/bin/java" -jar "/home/rightscale/.chef/local-mode-cache/cache/jenkins-cli.jar" -s http://localhost:8080 install-plugin /home/rightscale/.chef/local-mode-cache/cache/swarm-3.4.plugin -name swarm ----
STDOUT: /home/rightscale/.chef/local-mode-cache/cache/swarm-3.4.plugin is neither a valid file, URL, nor a plugin artifact name in the update center
STDERR: ERROR: Error occurred, see previous output.
Steps to Reproduce:
Run jenkins_plugin code and get the error above.
Example:
jenkins_plugin 'swarm' do
version node['rsc_jenkins']['swarm']['version']
install_deps true
notifies :restart, 'service[jenkins]', :immediately
end
Expected Result:
Plugin should be installed.
Actual Result:
Plugin install fails with error above instead of being installed.
It appears the -remoting option needs to be passed to the cli options in jenkins_plugin for this to now work:
java -jar /home/rightscale/.chef/local-mode-cache/cache/jenkins-cli.jar -remoting -s http://localhost:8080 install-plugin /home/rightscale/.chef/local-mode-cache/cache/swarm-3.4.plugin -name swarm
Installing a plugin from local file: /home/rightscale/.chef/local-mode-cache/cache/swarm-3.4.plugin
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 19 (7 by maintainers)
+1 Major issue for us.
5.0.1 seems to fix the issues with
jenkins_pluginfor me.Version 5.0.1 does not fix this for me. I am unable to use the SSH protocol because Jenkins by default starts with SSH disabled so the SSH protocol causes errors when attempting to do anything.
I am trying to use the http protocol as the remoting protocol is deprecated and causes warnings.
Using the http protocol causes the same errors.
I’ve attempted to set the protocol to nil. This gives me:
@daften I haven’t tried that but I bet it will work.