Skip to content

Commit 203d4c7

Browse files
committed
drop eol jira support < 9.12.0
1 parent e6580f1 commit 203d4c7

File tree

7 files changed

+29
-95
lines changed

7 files changed

+29
-95
lines changed

REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Data type: `String`
185185

186186
The JIRA version to install or upgrade to. Changing this will trigger a restart
187187

188-
Default value: `'8.13.5'`
188+
Default value: `'9.12.0'`
189189

190190
##### <a name="-jira--product"></a>`product`
191191

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
class jira (
289289

290290
# Jira Settings
291-
String $version = '8.13.5',
291+
String $version = '9.12.0',
292292
String[1] $product = 'jira',
293293
Stdlib::Absolutepath $installdir = '/opt/jira',
294294
Stdlib::Absolutepath $homedir = '/home/jira',

spec/acceptance/default_parameters_jira_10_spec.rb

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,23 @@ class { 'postgresql::server':
5555
password => postgresql::postgresql_password('jiraadm', 'mypassword'),
5656
}
5757
58-
# There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
59-
# https://jira.atlassian.com/browse/JRASERVER-77097
60-
# Running with script_check_java_manage => true to solve this
6158
class { 'jira':
62-
version => '10.3.2',
63-
java_package => $java_package,
64-
javahome => $java_home,
65-
script_check_java_manage => false,
66-
connection_settings => 'tcpKeepAlive=true',
67-
require => Postgresql::Server::Db['jira'],
59+
version => '10.3.2',
60+
java_package => $java_package,
61+
javahome => $java_home,
62+
connection_settings => 'tcpKeepAlive=true',
63+
require => Postgresql::Server::Db['jira'],
6864
}
6965
EOS
7066

7167
pp = pre + pp
7268

7369
pp_upgrade = <<-EOS
7470
class { 'jira':
75-
version => '10.3.3',
76-
java_package => $java_package,
77-
javahome => $java_home,
78-
connection_settings => 'tcpKeepAlive=true',
79-
script_check_java_manage => false,
71+
version => '10.3.3',
72+
java_package => $java_package,
73+
javahome => $java_home,
74+
connection_settings => 'tcpKeepAlive=true',
8075
}
8176
EOS
8277

spec/acceptance/default_parameters_spec.rb

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,28 @@
55
describe 'jira postgresql' do
66
it 'installs with defaults' do
77
pp = <<-EOS
8-
$java_package = $facts['os']['family'] ? {
9-
'RedHat' => 'java-11-openjdk-headless',
10-
'Debian' => 'openjdk-11-jre-headless',
11-
}
12-
13-
$java_home = $facts['os']['family'] ? {
14-
'RedHat' => '/usr/lib/jvm/jre-11-openjdk',
15-
'Debian' => '/usr/lib/jvm/java-1.11.0-openjdk-amd64',
16-
}
17-
188
# The output of `systemctl status postgresql` is non ascii which
199
# breaks the Exec in Postgresql::Server::Instance::Reload
2010
# on rhel based docker containers
2111
# We don't need the output.
2212
class { 'postgresql::server':
2313
service_status => 'systemctl status postgresql > /dev/null',
24-
needs_initdb => true
14+
needs_initdb => true,
2515
}
2616
2717
postgresql::server::db { 'jira':
2818
user => 'jiraadm',
2919
password => postgresql::postgresql_password('jiraadm', 'mypassword'),
3020
}
3121
32-
# There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
33-
# https://jira.atlassian.com/browse/JRASERVER-77097
34-
# Running with script_check_java_manage => true to solve this
3522
class { 'jira':
36-
java_package => $java_package,
37-
javahome => $java_home,
38-
script_check_java_manage => true,
39-
require => Postgresql::Server::Db['jira'],
23+
require => Postgresql::Server::Db['jira'],
4024
}
4125
EOS
42-
pp_upgrade = <<-EOS
43-
$java_package = $facts['os']['family'] ? {
44-
'RedHat' => 'java-11-openjdk-headless',
45-
'Debian' => 'openjdk-11-jre-headless',
46-
}
47-
48-
$java_home = $facts['os']['family'] ? {
49-
'RedHat' => '/usr/lib/jvm/jre-11-openjdk',
50-
'Debian' => '/usr/lib/jvm/java-1.11.0-openjdk-amd64',
51-
}
5226

27+
pp_upgrade = <<-EOS
5328
class { 'jira':
54-
version => '8.16.0',
55-
java_package => $java_package,
56-
javahome => $java_home,
57-
script_check_java_manage => true
29+
version => '9.12.29',
5830
}
5931
EOS
6032

@@ -100,7 +72,7 @@ class { 'jira':
10072
end
10173

10274
describe command('wget -q --tries=54 --retry-connrefused --read-timeout=10 -O- localhost:8080') do
103-
its(:stdout) { is_expected.to include('8.16.0') }
75+
its(:stdout) { is_expected.to include('9.12.29') }
10476
end
10577

10678
describe 'shutdown' do
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
jira::java_package: openjdk-17-jre
3+
jira::javahome: /usr/lib/jvm/java-17-openjdk-amd64
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
jira::java_package: java-17-openjdk
3+
jira::javahome: /usr/lib/jvm/jre-17-openjdk

spec/acceptance/mysql_spec.rb

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,14 @@ class { 'mysql::server':
2121
grant => ['ALL'],
2222
}
2323
24-
class { 'java':
25-
distribution => 'jre',
26-
}
27-
28-
exec { 'tmpkey':
29-
command => "openssl req -x509 -nodes -days 1 -subj '/C=CA/ST=QC/L=Montreal/O=FOO/CN=${facts['networking']['fqdn']}' -newkey rsa:1024 -keyout /tmp/key.pem -out /tmp/cert.pem",
30-
path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ],
31-
creates => '/tmp/cert.pem',
32-
}
33-
34-
java_ks { 'jira':
35-
ensure => present,
36-
name => 'jira',
37-
certificate => '/tmp/cert.pem',
38-
private_key => '/tmp/key.pem',
39-
target => '/tmp/jira.ks',
40-
password => 'changeit',
41-
require => Exec['tmpkey'],
42-
}
43-
44-
# There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
45-
# https://jira.atlassian.com/browse/JRASERVER-77097
46-
# Running with script_check_java_manage => true to solve this
4724
class { 'jira':
48-
installdir => '/opt/atlassian-jira',
49-
homedir => '/opt/jira-home',
50-
javahome => '/usr',
51-
jvm_type => 'oracle-jdk-1.8',
52-
db => 'mysql',
53-
dbport => 3306,
54-
dbdriver => 'com.mysql.jdbc.Driver',
55-
dbtype => 'mysql',
56-
tomcat_port => 8081,
57-
tomcat_native_ssl => true,
58-
tomcat_keystore_file => '/tmp/jira.ks',
59-
script_check_java_manage => true,
60-
require => [Mysql::Db['jira'], Java_ks['jira']],
25+
db => 'mysql',
26+
require => Mysql::Db['jira'],
6127
}
6228
EOS
6329

64-
wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'
30+
# jira just takes *ages* to start up :-(
31+
wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'
6532
apply_manifest(pp, catch_failures: true)
6633
sleep SLEEP_SECONDS
6734
shell wget_cmd, acceptable_exit_codes: [0, 8]
@@ -75,7 +42,7 @@ class { 'jira':
7542
it { is_expected.to be_running }
7643
end
7744

78-
describe port(8081) do
45+
describe port(8080) do
7946
it { is_expected.to be_listening }
8047
end
8148

@@ -89,14 +56,8 @@ class { 'jira':
8956
it { is_expected.to have_login_shell '/bin/true' }
9057
end
9158

92-
specify do
93-
expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081')).
94-
to have_attributes(stdout: %r{8.13.5})
95-
end
96-
97-
specify do
98-
expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443')).
99-
to have_attributes(stdout: %r{8.13.5})
59+
describe command('wget -q --tries=54 --retry-connrefused --read-timeout=10 -O- localhost:8080') do
60+
its(:stdout) { is_expected.to include('9.12.0') }
10061
end
10162

10263
describe 'shutdown' do

0 commit comments

Comments
 (0)