From f8ddab126c89633d5e65e73cfc2d44ee4b533ea6 Mon Sep 17 00:00:00 2001 From: Jan Brauer Date: Fri, 26 Sep 2014 10:03:03 +0200 Subject: [PATCH] Fix installation of core plugins This prevents the 'plugin.jpi.pinned' file from being deleted. --- manifests/plugin.pp | 2 +- spec/defines/jenkins_plugin_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/plugin.pp b/manifests/plugin.pp index f0cbe4229..62d6f39b6 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -92,7 +92,7 @@ } exec { "download-${name}" : - command => "rm -rf ${name} ${name}.* && wget --no-check-certificate ${base_url}${plugin}", + 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'], diff --git a/spec/defines/jenkins_plugin_spec.rb b/spec/defines/jenkins_plugin_spec.rb index 4fc3618a7..2969344de 100644 --- a/spec/defines/jenkins_plugin_spec.rb +++ b/spec/defines/jenkins_plugin_spec.rb @@ -25,7 +25,7 @@ describe 'without version' do it { should contain_exec('download-myplug').with( - :command => 'rm -rf myplug myplug.* && wget --no-check-certificate http://updates.jenkins-ci.org/latest/myplug.hpi', + :command => 'rm -rf myplug myplug.hpi myplug.jpi && wget --no-check-certificate http://updates.jenkins-ci.org/latest/myplug.hpi', :environment => nil )} it { should contain_file('/var/lib/jenkins/plugins/myplug.hpi')}