Merge "Allow for plugin pinning"
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
define jenkins::plugin(
|
||||
$version=0,
|
||||
$pin=false,
|
||||
) {
|
||||
$plugin = "${name}.hpi"
|
||||
$plugin_dir = '/var/lib/jenkins/plugins'
|
||||
@@ -67,4 +68,18 @@ define jenkins::plugin(
|
||||
# outage timing better.
|
||||
# notify => Service['jenkins'],
|
||||
}
|
||||
|
||||
if ($pin) {
|
||||
file { "${plugin_dir}/${plugin}.pinned":
|
||||
ensure => present,
|
||||
require => Exec["download-${name}"],
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0644',
|
||||
}
|
||||
} else {
|
||||
file { "${plugin_dir}/${plugin}.pinned":
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user