Skip to content

Commit 37c61f0

Browse files
Merge pull request #616 from puppetlabs/CAT-2511-Test_docker_provisioned_sles
(CAT-2511) Address configuration issues related to SLES 12 & 15 CI
2 parents e627cdb + bf9d853 commit 37c61f0

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
needs: Spec
1616
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
1717
with:
18-
flags: "--nightly"
18+
flags: "--nightly --arch-exclude arm"
1919
secrets: "inherit"

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
needs: Spec
1515
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
1616
with:
17-
flags: "--nightly"
17+
flags: "--nightly --arch-exclude arm"
1818
secrets: "inherit"

manifests/init.pp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,17 @@
110110
default => '--jre'
111111
}
112112

113-
# If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package
114-
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) {
115-
exec { 'Enable legacy repos':
116-
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
117-
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['full']}/x86_64",
118-
unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['full']}/x86_64",
113+
# TEMPORARY FIX: If no repos are configured on SLES, add openSUSE Leap as fallback
114+
# This workaround is needed because GCP-provisioned SLES images are unregistered BYOS
115+
# without any package repositories configured. Remove this once proper PAYG images are used.
116+
if ($facts['os']['family'] in ['SLES', 'SUSE']) {
117+
exec { 'Configure zypper repo for SLES':
118+
path => '/bin:/usr/bin:/sbin:/usr/sbin',
119+
command => 'zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback && zypper --non-interactive --gpg-auto-import-keys refresh',
120+
unless => "zypper lr 2>/dev/null | grep -q 'opensuse-leap-fallback\\|http'",
121+
logoutput => true,
119122
}
123+
-> Package['java']
120124
}
121125

122126
if $facts['os']['family'] == 'Debian' {

0 commit comments

Comments
 (0)