Skip to content

Extend the version check to the tailored jira servicedesk version #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@

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

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