Skip to content

Commit feb371a

Browse files
committed
(CAT-2511) Fix SLES issue in CI and acceptance tests
Testing fixes for SLES in CI and acceptance tests.
1 parent cdb899c commit feb371a

2 files changed

Lines changed: 11 additions & 10 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 --platform-exclude centos-7 --platform-exclude oraclelinux-7 --platform-exclude scientific-7 --platform-exclude almalinux-8"
18+
flags: "--nightly --platform-include sles-12 --platform-include sles-15"
1919
secrets: "inherit"

spec/setup_acceptance_node.pp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55

66
case $facts['os']['family'] {
77
'SLES', 'SUSE': {
8-
# Enable legacy repo to install net-tools-deprecated package
9-
# If SUSE OS major version is >= 15 and minor version is > 3
10-
if (versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
11-
exec { 'enable legacy repos':
12-
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
13-
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['major']}.${facts['os']['release']['minor']}/x86_64",
14-
unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['major']}.${facts['os']['release']['minor']}/x86_64",
15-
}
8+
# TEMPORARY FIX: Add fallback repo for unregistered SLES systems
9+
# GCP BYOS images have zero repos configured, SUSEConnect doesn't work
10+
exec { 'Configure zypper repo for SLES':
11+
path => '/bin:/usr/bin:/sbin:/usr/sbin',
12+
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',
13+
unless => "zypper lr 2>/dev/null | grep -q 'opensuse-leap-fallback\\|http'",
14+
logoutput => true,
1615
}
16+
1717
# needed for netstat, for serverspec checks
1818
package { 'net-tools-deprecated':
19-
ensure => 'latest',
19+
ensure => 'latest',
20+
require => Exec['Configure zypper repo for SLES'],
2021
}
2122
}
2223
'RedHat': {

0 commit comments

Comments
 (0)