rtyler/puppet-jenkins

updating plugins

Opened this issue · 3 comments

Since installing a jenkins server and several plugins with jenkins::plugin, the jenkins GUI has reported that some are out of date.

If they are updated from the jenkins GUI, puppet reinstalls the previous version on the next run.

In the jenkins::plugin {} stanza, no versions are specified. How can I tell jenkins::plugin/puppet to update plugins to the latest?

Also tried to specify a version, instead of
"git" : ;
do
"git" : version => "1.4.0" ;
but it did not cause git to be upgraded from 1.3 to 1.4

It may not have propagated to the new location, or might not be available. The plugin uses a very simple method to get the file. If it's not there, it will fail. It should, by default, download the most recent version available at the latest/ directory.

Why not check the file path on the jenkins infra side ? That might help track down the issue..

My devs have updated the server from the Jenkins GUI, so I don't have the example to play with.

Reading "manifests/plugin.pp" I see how it works now. For an example the "git" plugin: it downloads http://updates.jenkins-ci.org/latest/git.hpi if no version is specified, otherwise updates.jenkins-ci.org/download/plugins/git/1.3.0/git.hpi if say 1.3 is specified.

The download via the URL above will happen:
command => "wget --no-check-certificate ${base_url}${plugin}",
if the plugin is not there yet.
unless => "test -f ${plugin_dir}/${plugin}",

So I understand it downloads the latest or specified version initially, and then doesn't touch it, unless the plugin gets deleted from the server.

This issue can be closed if you like. Regards, Sean.

Jenkins does "help" a bit behind the scenes. It will rename some of the files, or if it's updated from the dashboard, it will also remove the file, so it's possible to see loops :(

This is the best we've got for right now. We'll see if we can make it better :)