puppet-jenkins
puppet-jenkins copied to clipboard
Jenkins::Plugin should respect installed plugins, support ensure => latest
We need a mechanism for issuing a query to: "${plugins_host}/download/plugins/${name}/" to determine whether a later version of a plugin might be available, to support installing the latest version rather than a pinned version.
As my catalog gets applied I'm seeing this:
rm -rf analysis-collector analysis-collector.hpi analysis-collector.jpi
&& wget --no-check-certificate http://updates.jenkins-ci.org/latest/analysis-collector.hpi
This Exec[] resource needs an if, onlyif or unless condition to test for the presence of the intended version of a plugin.
exec { "download-${name}" :
command => "rm -rf ${name} ${name}.hpi ${name}.jpi && wget --no-check-certificate ${base_url}${plugin}",
cwd => $plugin_dir,
require => [File[$plugin_dir], Package['wget']],
path => ['/usr/bin', '/usr/sbin', '/bin'],
}
I should not have to wait while every plugin on an installation is purged and re-installed on every puppet agent run.