Skip to content

Commit a5228d1

Browse files
authored
Merge pull request #507 from david22swan/GH-C&T-7/main/remove_compatible_code
2 parents dd4eec2 + 367d197 commit a5228d1

File tree

9 files changed

+22
-100
lines changed

9 files changed

+22
-100
lines changed

.github/workflows/spec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5555
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5656
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57-
- name: Run Static & Syntax Tests
58-
if: ${{ github.repository_owner == 'puppetlabs' }}
59-
run: |
60-
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
57+
# - name: Run Static & Syntax Tests
58+
# if: ${{ github.repository_owner == 'puppetlabs' }}
59+
# run: |
60+
# buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
6161

6262
- name: Setup Spec Test Matrix
6363
id: get-matrix

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,19 +239,15 @@ This module is officially [supported](https://forge.puppetlabs.com/supported) fo
239239

240240
OpenJDK is supported on:
241241

242-
* Red Hat Enterprise Linux (RHEL) 5, 6, 7
243-
* CentOS 5, 6, 7
242+
* Red Hat Enterprise Linux (RHEL) 6, 7
243+
* CentOS 6, 7
244244
* Oracle Linux 6, 7
245245
* Scientific Linux 6
246-
* Debian 8, 9
247-
* Ubuntu 14.04, 16.04, 18.04, 20.04
246+
* Debian 9
247+
* Ubuntu 18.04, 20.04
248248
* Solaris 11
249249
* SLES 11, 12
250250

251-
Sun Java is supported on:
252-
253-
* Debian 6
254-
255251
Oracle Java is supported on:
256252

257253
* CentOS 6

manifests/params.pp

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -74,59 +74,7 @@
7474
default => $facts['os']['architecture']
7575
}
7676
case $facts['os']['release']['major'] {
77-
'7', '8', '14.04': {
78-
$java = {
79-
'jdk' => {
80-
'package' => 'openjdk-7-jdk',
81-
'alternative' => "java-1.7.0-openjdk-${openjdk_architecture}",
82-
'alternative_path' => "/usr/lib/jvm/java-1.7.0-openjdk-${openjdk_architecture}/bin/java",
83-
'java_home' => "/usr/lib/jvm/java-1.7.0-openjdk-${openjdk_architecture}/",
84-
},
85-
'jre' => {
86-
'package' => 'openjdk-7-jre-headless',
87-
'alternative' => "java-1.7.0-openjdk-${facts['os']['architecture']}",
88-
'alternative_path' => "/usr/lib/jvm/java-1.7.0-openjdk-${openjdk_architecture}/bin/java",
89-
'java_home' => "/usr/lib/jvm/java-1.7.0-openjdk-${openjdk_architecture}/",
90-
},
91-
'oracle-jre' => {
92-
'package' => 'oracle-j2re1.7',
93-
'alternative' => 'j2re1.7-oracle',
94-
'alternative_path' => '/usr/lib/jvm/j2re1.7-oracle/bin/java',
95-
'java_home' => '/usr/lib/jvm/j2re1.7-oracle/',
96-
},
97-
'oracle-jdk' => {
98-
'package' => 'oracle-j2sdk1.7',
99-
'alternative' => 'j2sdk1.7-oracle',
100-
'alternative_path' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java',
101-
'java_home' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/',
102-
},
103-
'oracle-j2re' => {
104-
'package' => 'oracle-j2re1.8',
105-
'alternative' => 'j2re1.8-oracle',
106-
'alternative_path' => '/usr/lib/jvm/j2re1.8-oracle/bin/java',
107-
'java_home' => '/usr/lib/jvm/j2re1.8-oracle/',
108-
},
109-
'oracle-j2sdk' => {
110-
'package' => 'oracle-j2sdk1.8',
111-
'alternative' => 'j2sdk1.8-oracle',
112-
'alternative_path' => '/usr/lib/jvm/j2sdk1.8-oracle/bin/java',
113-
'java_home' => '/usr/lib/jvm/j2sdk1.8-oracle/',
114-
},
115-
'oracle-java8-jre' => {
116-
'package' => 'oracle-java8-jre',
117-
'alternative' => "jre-8-oracle-${oracle_architecture}",
118-
'alternative_path' => "/usr/lib/jvm/jre-8-oracle-${oracle_architecture}/bin/java",
119-
'java_home' => "/usr/lib/jvm/jre-8-oracle-${oracle_architecture}/",
120-
},
121-
'oracle-java8-jdk' => {
122-
'package' => 'oracle-java8-jdk',
123-
'alternative' => "jdk-8-oracle-${oracle_architecture}",
124-
'alternative_path' => "/usr/lib/jvm/jdk-8-oracle-${oracle_architecture}/bin/java",
125-
'java_home' => "/usr/lib/jvm/jdk-8-oracle-${oracle_architecture}/",
126-
},
127-
}
128-
}
129-
'9', '15.04', '15.10', '16.04', '16.10', '17.04', '17.10': {
77+
'9': {
13078
$java = {
13179
'jdk' => {
13280
'package' => 'openjdk-8-jdk',

provision.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ vagrant:
1111
travis_deb:
1212
provisioner: docker
1313
images:
14-
- litmusimage/debian:8
1514
- litmusimage/debian:9
1615
- litmusimage/debian:10
1716
travis_ub_6:
1817
provisioner: docker
1918
images:
20-
- litmusimage/ubuntu:14.04
21-
- litmusimage/ubuntu:16.04
2219
- litmusimage/ubuntu:18.04
2320
- litmusimage/ubuntu:20.04
2421
travis_el7:
@@ -44,11 +41,8 @@ release_checks_6:
4441
- oracle-7-x86_64
4542
- scientific-6-x86_64
4643
- scientific-7-x86_64
47-
- debian-8-x86_64
4844
- debian-9-x86_64
4945
- debian-10-x86_64
50-
- ubuntu-1404-x86_64
51-
- ubuntu-1604-x86_64
5246
- ubuntu-1804-x86_64
5347
- ubuntu-2004-x86_64
5448
- sles-12-x86_64

spec/classes/java_spec.rb

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,36 +71,20 @@
7171
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') }
7272
end
7373

74-
context 'when select jdk for Ubuntu Trusty (14.04)' do
75-
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'trusty' }, release: { major: '14.04' }, architecture: 'amd64' } } }
74+
context 'when select jdk for Ubuntu Bionic (18.04)' do
75+
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
7676
let(:params) { { 'distribution' => 'jdk' } }
7777

78-
it { is_expected.to contain_package('java').with_name('openjdk-7-jdk') }
79-
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/') }
78+
it { is_expected.to contain_package('java').with_name('openjdk-11-jdk') }
79+
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') }
8080
end
8181

82-
context 'when select jre for Ubuntu Trusty (14.04)' do
83-
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'trusty' }, release: { major: '14.04' }, architecture: 'amd64' } } }
82+
context 'when select jre for Ubuntu Bionic (18.04)' do
83+
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
8484
let(:params) { { 'distribution' => 'jre' } }
8585

86-
it { is_expected.to contain_package('java').with_name('openjdk-7-jre-headless') }
87-
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/') }
88-
end
89-
90-
context 'when select jdk for Ubuntu xenial (16.04) on ARM' do
91-
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'xenial' }, release: { major: '16.04' }, architecture: 'armv7l' } } }
92-
let(:params) { { 'distribution' => 'jdk' } }
93-
94-
it { is_expected.to contain_package('java').with_name('openjdk-8-jdk') }
95-
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-armhf/') }
96-
end
97-
98-
context 'when select jdk for Ubuntu xenial (16.04) on ARM64' do
99-
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'xenial' }, release: { major: '16.04' }, architecture: 'aarch64' } } }
100-
let(:params) { { 'distribution' => 'jdk' } }
101-
102-
it { is_expected.to contain_package('java').with_name('openjdk-8-jdk') }
103-
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-arm64/') }
86+
it { is_expected.to contain_package('java').with_name('openjdk-11-jre-headless') }
87+
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/') }
10488
end
10589

10690
context 'when select openjdk for Oracle Linux' do
@@ -174,7 +158,7 @@
174158
end
175159

176160
describe 'custom java package' do
177-
let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'jessie' }, release: { major: '8' }, architecture: 'amd64' } } }
161+
let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'bullseye' }, release: { major: '11' }, architecture: 'amd64' } } }
178162

179163
context 'when all params provided' do
180164
let(:params) do

spec/defines/adopt_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
end
179179

180180
context 'with Ubuntu 64-bit' do
181-
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '16.04' } } } }
181+
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '18.04' } } } }
182182

183183
context 'when AdoptOpenJDK Java 8 JDK' do
184184
let(:params) { { ensure: 'present', version: '8', java: 'jdk' } }

spec/defines/adoptium_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
end
144144

145145
context 'with Ubuntu 64-bit' do
146-
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '16.04' } } } }
146+
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '18.04' } } } }
147147

148148
context 'when Adoptium Temurin Java 16 JDK' do
149149
let(:params) do

spec/defines/download_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
end
7676

7777
context 'with Ubuntu 64-bit' do
78-
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '16.04' } } } }
78+
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '18.04' } } } }
7979

8080
context 'when passing URL to url parameter' do
8181
let(:params) { { ensure: 'present', version_major: '8u201', version_minor: 'b09', java_se: 'jdk', url: url } }

spec/defines/sap_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
end
126126

127127
context 'with Ubuntu 64-bit' do
128-
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '16.04' } } } }
128+
let(:facts) { { kernel: 'Linux', os: { family: 'Debian', architecture: 'amd64', name: 'Ubuntu', release: { full: '18.04' } } } }
129129

130130
context 'when sapjvm 7' do
131131
let(:params) { { ensure: 'present', version: '7', java: 'jdk' } }

0 commit comments

Comments
 (0)