Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
needs: Spec
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
with:
flags: "--nightly"
flags: "--platform-include sles-15"
secrets: "inherit"
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ group :development, :release_prep do
gem "puppet-blacksmith", '~> 7.0', require: false
end
group :system_tests do
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
gem "puppet_litmus", git: 'https://github.com/puppetlabs/puppet_litmus', branch: 'CAT-2476-Address_SLES_failures', require: false, platforms: [:ruby, :x64_mingw]
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "serverspec", '~> 2.41', require: false
end
Expand Down
5 changes: 3 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@
}

# If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package
# Only attempt this if SUSEConnect is available and the system is registered
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) {
exec { 'Enable legacy repos':
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['full']}/x86_64",
unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['full']}/x86_64",
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['major']}/x86_64",
unless => "test ! -x /usr/bin/SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-legacy/${facts['os']['release']['major']}/x86_64)'",
}
}

Expand Down
15 changes: 15 additions & 0 deletions spec/acceptance/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@
MANIFEST

describe 'installing' do
before(:all) do
# Configure Puppet Labs internal mirror for SLES (required for java-1_8_0-openjdk packages)
if os[:family] == 'sles'
sles_version = os[:release].split('.').first # Get major version (15 from 15.x)
mirror_manifest = <<-MANIFEST
exec { 'add osmirror repo':
command => "zypper addrepo -G -c -n 'localmirror-os' 'http://osmirror.delivery.puppetlabs.net/sles-#{sles_version}-gm-x86_64/RPMS.os' localmirror-os",
path => ['/usr/bin', '/bin'],
unless => 'zypper lr | grep -q localmirror-os',
}
MANIFEST
apply_manifest(mirror_manifest, catch_failures: true)
end
end

context 'when installing java jre' do
it 'installs jre' do
idempotent_apply(java_class_jre)
Expand Down
Loading