Skip to content

Commit 0b96901

Browse files
committed
ci(kitchen+gitlab): update for new pre-salted images
* Semi-automated using myii/ssf-formula#288
1 parent ddf648d commit 0b96901

File tree

5 files changed

+39
-9
lines changed

5 files changed

+39
-9
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ default-centos-7-master-py3: {extends: '.test_instance'}
143143
# default-fedora-33-master-py3: {extends: '.test_instance'}
144144
# default-fedora-32-master-py3: {extends: '.test_instance'}
145145
default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
146+
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
146147
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
147148
# default-oraclelinux-8-master-py3: {extends: '.test_instance'}
148149
# default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
@@ -157,6 +158,7 @@ default-amazonlinux-2-master-py3: {extends: '.test_instance'}
157158
# default-fedora-33-3002-2-py3: {extends: '.test_instance'}
158159
# default-fedora-32-3002-2-py3: {extends: '.test_instance'}
159160
# default-opensuse-leap-152-3002-2-py3: {extends: '.test_instance'}
161+
# default-opensuse-tmbl-latest-3002-2-py3: {extends: '.test_instance'}
160162
# default-amazonlinux-2-3002-2-py3: {extends: '.test_instance'}
161163
# default-oraclelinux-8-3002-2-py3: {extends: '.test_instance'}
162164
default-oraclelinux-7-3002-2-py3: {extends: '.test_instance'}
@@ -173,6 +175,7 @@ default-oraclelinux-7-3002-2-py3: {extends: '.test_instance'}
173175
# default-fedora-33-3001-4-py3: {extends: '.test_instance'}
174176
# default-fedora-32-3001-4-py3: {extends: '.test_instance'}
175177
# default-opensuse-leap-152-3001-4-py3: {extends: '.test_instance'}
178+
# default-opensuse-tmbl-latest-3001-4-py3: {extends: '.test_instance'}
176179
# default-amazonlinux-2-3001-4-py3: {extends: '.test_instance'}
177180
# default-oraclelinux-8-3001-4-py3: {extends: '.test_instance'}
178181
# default-oraclelinux-7-3001-4-py3: {extends: '.test_instance'}

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
# - env: INSTANCE=default-fedora-33-master-py3
104104
# - env: INSTANCE=default-fedora-32-master-py3
105105
- env: INSTANCE=default-opensuse-leap-152-master-py3
106+
- env: INSTANCE=default-opensuse-tmbl-latest-master-py3
106107
- env: INSTANCE=default-amazonlinux-2-master-py3
107108
# - env: INSTANCE=default-oraclelinux-8-master-py3
108109
# - env: INSTANCE=default-gentoo-stage3-latest-master-py3
@@ -117,6 +118,7 @@ jobs:
117118
# - env: INSTANCE=default-fedora-33-3002-2-py3
118119
# - env: INSTANCE=default-fedora-32-3002-2-py3
119120
# - env: INSTANCE=default-opensuse-leap-152-3002-2-py3
121+
# - env: INSTANCE=default-opensuse-tmbl-latest-3002-2-py3
120122
# - env: INSTANCE=default-amazonlinux-2-3002-2-py3
121123
# - env: INSTANCE=default-oraclelinux-8-3002-2-py3
122124
- env: INSTANCE=default-oraclelinux-7-3002-2-py3
@@ -133,6 +135,7 @@ jobs:
133135
# - env: INSTANCE=default-fedora-33-3001-4-py3
134136
# - env: INSTANCE=default-fedora-32-3001-4-py3
135137
# - env: INSTANCE=default-opensuse-leap-152-3001-4-py3
138+
# - env: INSTANCE=default-opensuse-tmbl-latest-3001-4-py3
136139
# - env: INSTANCE=default-amazonlinux-2-3001-4-py3
137140
# - env: INSTANCE=default-oraclelinux-8-3001-4-py3
138141
# - env: INSTANCE=default-oraclelinux-7-3001-4-py3

kitchen.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ platforms:
7979
# => SCP did not finish successfully (255): (Net::SCP::Error)
8080
transport:
8181
max_ssh_sessions: 1
82+
- name: opensuse-tmbl-latest-master-py3
83+
driver:
84+
image: saltimages/salt-master-py3:opensuse-tumbleweed-latest
85+
run_command: /usr/lib/systemd/systemd
86+
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
87+
# => SCP did not finish successfully (255): (Net::SCP::Error)
88+
transport:
89+
max_ssh_sessions: 1
8290
- name: amazonlinux-2-master-py3
8391
driver:
8492
image: saltimages/salt-master-py3:amazonlinux-2
@@ -129,6 +137,14 @@ platforms:
129137
# => SCP did not finish successfully (255): (Net::SCP::Error)
130138
transport:
131139
max_ssh_sessions: 1
140+
- name: opensuse-tmbl-latest-3002-2-py3
141+
driver:
142+
image: saltimages/salt-3002.2-py3:opensuse-tumbleweed-latest
143+
run_command: /usr/lib/systemd/systemd
144+
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
145+
# => SCP did not finish successfully (255): (Net::SCP::Error)
146+
transport:
147+
max_ssh_sessions: 1
132148
- name: amazonlinux-2-3002-2-py3
133149
driver:
134150
image: saltimages/salt-3002.2-py3:amazonlinux-2
@@ -186,6 +202,14 @@ platforms:
186202
# => SCP did not finish successfully (255): (Net::SCP::Error)
187203
transport:
188204
max_ssh_sessions: 1
205+
- name: opensuse-tmbl-latest-3001-4-py3
206+
driver:
207+
image: saltimages/salt-3001.4-py3:opensuse-tumbleweed-latest
208+
run_command: /usr/lib/systemd/systemd
209+
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
210+
# => SCP did not finish successfully (255): (Net::SCP::Error)
211+
transport:
212+
max_ssh_sessions: 1
189213
- name: amazonlinux-2-3001-4-py3
190214
driver:
191215
image: saltimages/salt-3001.4-py3:amazonlinux-2

test/integration/share/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ The `system` library provides easy access to system dependent information:
1313
- `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective
1414
- `system.platform[:family]` provide a family name for Arch and Gentoo
1515
- `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows`
16-
- `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo and Windows:
16+
- `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo, openSUSE and Windows:
1717
- `Arch` is always `base-latest`
1818
- `Amazon Linux` release `2018` is resolved as `1`
1919
- `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`)
20+
- `openSUSE` is resolved as `tumbleweed` if the `platform[:release]` is in date format
2021
- `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version
2122
- `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example)

test/integration/share/libraries/system.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def build_platform_name
4545
end
4646
end
4747

48-
# rubocop:disable Metrics/MethodLength
48+
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
4949
def build_platform_release
5050
case inspec.platform[:name]
5151
when 'amazon'
@@ -55,6 +55,10 @@ def build_platform_release
5555
'base-latest'
5656
when 'gentoo'
5757
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}"
58+
when 'opensuse'
59+
# rubocop:disable Style/NumericLiterals,Layout/LineLength
60+
inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release]
61+
# rubocop:enable Style/NumericLiterals,Layout/LineLength
5862
when 'windows_8.1_pro'
5963
'8.1'
6064
when 'windows_server_2019_datacenter'
@@ -63,15 +67,10 @@ def build_platform_release
6367
inspec.platform[:release]
6468
end
6569
end
66-
# rubocop:enable Metrics/MethodLength
70+
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
6771

6872
def derive_gentoo_init_system
69-
case inspec.command('systemctl').exist?
70-
when true
71-
'sysd'
72-
else
73-
'sysv'
74-
end
73+
inspec.command('systemctl').exist? ? 'sysd' : 'sysv'
7574
end
7675

7776
def build_platform_finger

0 commit comments

Comments
 (0)