Skip to content

Commit

Permalink
Pin credentials plugin to an older version
Browse files Browse the repository at this point in the history
This is needed because the latest version of credentials is incompatible
with the lts version, which breaks fresh installations.
  • Loading branch information
ekohl committed May 3, 2022
1 parent 1d517a8 commit 544e47e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
class jenkins::config {
assert_private()

ensure_resource('jenkins::plugin', $jenkins::default_plugins)
if $jenkins::default_plugins =~ Array {
ensure_resource('jenkins::plugin', $jenkins::default_plugins)
} else {
ensure_resources('jenkins::plugin', $jenkins::default_plugins)
}

$config_hash = merge(
$jenkins::params::config_hash_defaults,
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
String $user = 'jenkins',
Boolean $manage_group = true,
String $group = 'jenkins',
Array $default_plugins = $jenkins::params::default_plugins,
Variant[Array[String], Hash[String, Hash]] $default_plugins = $jenkins::params::default_plugins,
String $default_plugins_host = 'https://updates.jenkins.io',
Boolean $purge_plugins = false,
Enum['simple', 'forking'] $systemd_type = $jenkins::params::systemd_type,
Expand Down
15 changes: 8 additions & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
class jenkins::params {
$swarm_version = '2.2'
$_java_args = '-Djava.awt.headless=true -Djenkins.install.runSetupWizard=false'
$default_plugins = [
'credentials', # required by puppet_helper.groovy
'javax-activation-api', # implied by all plugin
'javax-mail-api', # implied by all plugins
'sshd', # implied by structs
'structs', # required by credentials plugin
]
$default_plugins = {
# Pin to 1074 now - not pretty, but latest is incompatible with LTS now
'credentials' => { 'version' => '1074.v60e6c29b_b_44b_' }, # required by puppet_helper.groovy
'javax-activation-api' => {}, # implied by all plugin
'javax-mail-api' => {}, # implied by all plugins
'sshd' => {}, # implied by structs
'structs' => {}, # required by credentials plugin
}

if versioncmp(pick($facts['jenkins_version'], '2.313'), '2.313') >= 0 {
$systemd_type = 'simple'
Expand Down

0 comments on commit 544e47e

Please sign in to comment.