Skip to content

Commit 6440f52

Browse files
authored
Merge pull request #383 from diLLec/master
Extend the version check to the tailored jira servicedesk version
2 parents 028d796 + fdf8350 commit 6440f52

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

manifests/init.pp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274

275275
# Jira Settings
276276
String $version = '8.13.5',
277-
String $product = 'jira',
277+
String[1] $product = 'jira',
278278
Stdlib::Absolutepath $installdir = '/opt/jira',
279279
Stdlib::Absolutepath $homedir = '/home/jira',
280280
Boolean $manage_user = true,
@@ -354,7 +354,7 @@
354354
# Command to stop jira in preparation to upgrade. This is configurable
355355
# incase the jira service is managed outside of puppet. eg: using the
356356
# puppetlabs-corosync module: 'crm resource stop jira && sleep 15'
357-
# Note: the command should return either 0 or 5
357+
# Note: the command should return either 0 or 5
358358
# when the service doesn't exist
359359
String $stop_jira = 'systemctl stop jira.service && sleep 15',
360360
# Whether to manage the 'check-java.sh' script, and where to retrieve
@@ -412,9 +412,13 @@
412412
Optional[Integer[0]] $poolsize = undef,
413413
Optional[Boolean] $enable_connection_pooling = undef,
414414
) {
415-
if versioncmp($jira::version, '8.0.0') < 0 {
415+
# To maintain compatibility with previous behaviour, we check for not-servicedesk instead of specifying the
416+
if $product != 'servicedesk' and versioncmp($jira::version, '8.0.0') < 0 {
416417
fail('JIRA versions older than 8.0.0 are no longer supported. Please use an older version of this module to upgrade first.')
417418
}
419+
if $product == 'servicedesk' and versioncmp($jira::version, '4.10.0') < 0 {
420+
fail('JIRA servicedesk versions older than 4.10.0 are no longer supported. Please use an older version of this module to upgrade first.')
421+
}
418422

419423
if $datacenter and !$shared_homedir {
420424
fail("\$shared_homedir must be set when \$datacenter is true")

0 commit comments

Comments
 (0)