Skip to content

Commit 250a1c4

Browse files
authored
Merge pull request #89 from myii/feature/use-new-ci-matrix
ci(kitchen+travis): implement new distro-python-salt_version matrix
2 parents 0dab08d + bd4792d commit 250a1c4

File tree

2 files changed

+172
-86
lines changed

2 files changed

+172
-86
lines changed

.travis.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ before_install:
1818
# the `platforms` defined in `kitchen.yml`
1919
env:
2020
matrix:
21-
- INSTANCE: default-debian-9
22-
- INSTANCE: default-debian-8
23-
- INSTANCE: default-ubuntu-1804
24-
- INSTANCE: default-ubuntu-1604
25-
- INSTANCE: default-centos-7
26-
# - INSTANCE: default-centos-6
27-
- INSTANCE: default-fedora
28-
- INSTANCE: default-opensuse-leap-salt-minion
21+
- INSTANCE: v2019-2-py3-debian-9
22+
- INSTANCE: v2019-2-py3-ubuntu-1804
23+
- INSTANCE: v2019-2-py2-centos-7
24+
- INSTANCE: v2019-2-py2-fedora-29
25+
26+
- INSTANCE: v2018-3-py2-debian-8
27+
- INSTANCE: v2018-3-py2-ubuntu-1604
28+
# - INSTANCE: v2018-3-py2-bootstrap-centos-6
29+
- INSTANCE: v2018-3-py2-forced-version-fedora-28
30+
- INSTANCE: v2018-3-py2-opensuse-423
31+
32+
- INSTANCE: v2017-7-py2-debian-8
33+
- INSTANCE: v2017-7-py2-ubuntu-1604
34+
# - INSTANCE: v2017-7-py2-bootstrap-centos-6
2935

3036
script:
3137
- bundle exec kitchen verify ${INSTANCE}

kitchen.yml

Lines changed: 158 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,90 +4,72 @@
44
# For help on this file's format, see https://kitchen.ci/
55
driver:
66
name: docker
7-
8-
driver_config:
97
use_sudo: false
108
privileged: true
9+
run_command: /lib/systemd/systemd
1110
provision_command: mkdir -p /run/sshd
1211

1312
# Make sure the platforms listed below match up with
1413
# the `env.matrix` instances defined in `.travis.yml`
1514
platforms:
16-
# The `run_command` used for each platform is required to
17-
# test `systemd` services in docker
15+
# Latest distros
1816
- name: debian-9
19-
driver_config:
20-
image: debian:9
21-
run_command: /lib/systemd/systemd
22-
provision_command:
23-
- apt-get update && apt-get install -y udev
24-
- name: debian-8
25-
driver_config:
26-
image: debian:8
27-
run_command: /lib/systemd/systemd
17+
driver:
2818
provision_command:
2919
- apt-get update && apt-get install -y udev
3020
- name: ubuntu-18.04
31-
driver_config:
32-
image: ubuntu:18.04
33-
run_command: /lib/systemd/systemd
34-
provision_command:
35-
- apt-get update && apt-get install -y udev
36-
- name: ubuntu-16.04
37-
driver_config:
38-
image: ubuntu:16.04
39-
run_command: /lib/systemd/systemd
21+
driver:
4022
provision_command:
4123
- apt-get update && apt-get install -y udev
4224
- name: centos-7
43-
driver_config:
44-
image: centos:7
45-
run_command: /usr/lib/systemd/systemd
46-
# - name: centos-6
47-
# driver_config:
48-
# image: centos:6
49-
# run_command: /usr/lib/systemd/systemd
50-
- name: fedora
51-
driver_config:
52-
image: fedora
53-
run_command: /usr/lib/systemd/systemd
25+
- name: fedora-29
26+
driver:
5427
provision_command:
5528
- yum -y update && yum -y install udev
56-
# As of February 2019, there have been problems getting `opensuse` to work:
57-
# * `opensuse` is deprecated
58-
# * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests
59-
# * `opensuse/tumbleweed` doesn't install `salt-minion`
60-
# * `opensuse/leap:42.3` does work
61-
# * `opensuse/salt-minion` uses `42.3` with `salt-minion` pre-installed
62-
- name: opensuse-leap-salt-minion
63-
driver_config:
64-
image: opensuse/salt-minion
65-
run_command: /usr/lib/systemd/systemd
29+
- name: opensuse-42.3
30+
driver:
6631
provision_command:
6732
- zypper refresh && zypper install -y udev
6833
- systemctl enable sshd.service
69-
- cat /etc/os-release
34+
run_command: /usr/lib/systemd/systemd
35+
36+
# Previous distros
37+
- name: debian-8
38+
- name: ubuntu-16.04
39+
driver:
40+
provision_command:
41+
- apt-get update && apt-get install -y udev
42+
- name: fedora-28
43+
driver:
44+
provision_command:
45+
- yum -y update && yum -y install udev
46+
# centos-6 guest fails on Debian hosts due to vsyscall issues, see
47+
# https://hub.docker.com/_/centos, "A note about vsyscall"
48+
# Disabled for `template-formula` because not `systemd` based
49+
# - name: centos-6
50+
# driver:
51+
# run_command: /sbin/init
7052

7153
provisioner:
7254
name: salt_solo
73-
log_level: debug
74-
require_chef: false
55+
log_level: info
7556
salt_version: latest
57+
require_chef: false
7658
formula: template
7759
salt_copy_filter:
7860
- .kitchen
7961
- .git
80-
pillars_from_files:
81-
template.sls: pillar.example
62+
state_top:
63+
base:
64+
'*':
65+
- template
8266
pillars:
8367
top.sls:
8468
base:
8569
'*':
8670
- template
87-
state_top:
88-
base:
89-
'*':
90-
- template
71+
pillars_from_files:
72+
template.sls: pillar.example
9173

9274
verifier:
9375
# https://www.inspec.io/
@@ -100,31 +82,129 @@ verifier:
10082
- path: test/integration/default
10183

10284
suites:
103-
- name: default
104-
# Below is an example where test suites are segregated by os_family
105-
# - name: debian
106-
# excludes:
107-
# - centos-7
108-
# - name: redhat
109-
# excludes:
110-
# - debian-9
111-
# - ubuntu-18.04
85+
# Latest distros, latest salt, python3
86+
# These distros have py3 packages available in salt's repo
87+
- name: v2019-2-py3
88+
includes:
89+
- debian-9
90+
- ubuntu-18.04
91+
provisioner:
92+
salt_bootstrap_options: -X -x python3 -d git %s
93+
salt_version: '2019.2'
94+
pillars:
95+
salt.sls:
96+
salt:
97+
release: '2019.2'
98+
py_ver: 'py3'
99+
# verifier:
100+
# inspec_tests:
101+
# - path: test/integration/2019-2
102+
103+
# Latest distros, latest salt, python2
104+
# Fedora ships updated py2 versions in their own repos
105+
- name: v2019-2-py2
106+
includes:
107+
- centos-7
108+
- fedora-29
109+
provisioner:
110+
salt_version: '2019.2'
111+
pillars:
112+
salt.sls:
113+
salt:
114+
release: '2019.2'
115+
py_ver: 'py2'
116+
# verifier:
117+
# inspec_tests:
118+
# - path: test/integration/2019-2
119+
120+
# Previous distros, previous salt, python2
121+
- name: v2018-3-py2
122+
includes:
123+
- debian-8
124+
- ubuntu-16.04
125+
- opensuse-42.3
126+
provisioner:
127+
# We require an old version of salt in the provisioner or,
128+
# the salt formula fails to downgrade to the desired version to test
129+
salt_version: '2018.3'
130+
pillars:
131+
salt.sls:
132+
salt:
133+
release: '2018.3'
134+
py_ver: 'py2'
135+
# verifier:
136+
# inspec_tests:
137+
# - path: test/integration/2018-3
138+
139+
# # centos-6 ships with python2.6, so it requires extra bootstrapping parameters
140+
# # to install python2.7
141+
# - name: v2018-3-py2-bootstrap
142+
# includes:
143+
# - centos-6
144+
# provisioner:
145+
# salt_bootstrap_options: -X -d stable %s
146+
# salt_version: '2018.3'
147+
# pillars:
148+
# salt.sls:
149+
# salt:
150+
# release: '2018.3'
151+
# py_ver: 'py2'
152+
# # verifier:
153+
# # inspec_tests:
154+
# # - path: test/integration/2018-3
155+
156+
# To tests fedora 28 & salt v2018.2, we need to force the package version
157+
# otherwise the image, which includes the 'updates' repo, will install 2019.2
158+
- name: v2018-3-py2-forced-version
159+
includes:
160+
- fedora-28
161+
provisioner:
162+
# We require an old version of salt in the provisioner or,
163+
# the salt formula fails to downgrade to the desired version to test
164+
salt_version: '2018.3'
165+
pillars:
166+
salt.sls:
167+
salt:
168+
release: '2018.3'
169+
py_ver: 'py2'
170+
version: '2018.3.0-1.fc28'
171+
# verifier:
172+
# inspec_tests:
173+
# - path: test/integration/2018-3
174+
175+
# Previous distros, oldest salt, python2
176+
- name: v2017-7-py2
177+
includes:
178+
- debian-8
179+
- ubuntu-16.04
180+
provisioner:
181+
# We require an old version of salt in the provisioner or,
182+
# the salt formula fails to downgrade to the desired version to test
183+
salt_version: '2017.7'
184+
pillars:
185+
salt.sls:
186+
salt:
187+
release: '2017.7'
188+
py_ver: 'py2'
189+
# verifier:
190+
# inspec_tests:
191+
# - path: test/integration/2017-7
192+
193+
# # centos-6 ships with python2.6, so it requires extra bootstrapping parameters
194+
# # to install python2.7
195+
# - name: v2017-7-py2-bootstrap
196+
# includes:
197+
# - centos-6
112198
# provisioner:
113-
# # You can add dependencies on other formulas to set up this formula's environment
114-
# dependencies:
115-
# - name: epel
116-
# repo: git
117-
# source: https://github.com/saltstack-formulas/epel-formula.git
118-
# state_top:
119-
# base:
120-
# '*':
121-
# - epel
122-
# - template
199+
# # As centos-6 ships with python2.6, we use the bootstrapper to install python2.7
200+
# salt_bootstrap_options: -X -d stable %s
201+
# salt_version: '2017.7'
123202
# pillars:
124-
# top.sls:
125-
# base:
126-
# '*':
127-
# - epel
128-
# - template
129-
# epel.sls:
130-
# disabled: false
203+
# salt.sls:
204+
# salt:
205+
# release: '2017.7'
206+
# py_ver: 'py2'
207+
# # verifier:
208+
# # inspec_tests:
209+
# # - path: test/integration/2017-7
210+

0 commit comments

Comments
 (0)