-
Notifications
You must be signed in to change notification settings - Fork 112
/
kitchen.yml
203 lines (202 loc) · 6.35 KB
/
kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
---
<% @vagrant = system('which vagrant 2>&1 >/dev/null') %>
driver:
name: docker
hostname: kitchen-salt.ci.local
use_sudo: false
socket: <%= ENV['DOCKER_HOST'] || 'unix:///var/run/docker.sock' %>
provision_command:
- DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip python3-dev gcc git locales console-data gnupg
- pip3 install --upgrade pip
- mkdir -p /run/sshd
- echo en_US.UTF-8 UTF-8 >> /etc/locale.gen; locale-gen; update-locale 'LANG="en_US.UTF-8"'
- echo export LANG=en_US.UTF-8 > ~kitchen/.bashrc
- echo 'export PATH=$PATH:/usr/sbin:/sbin' >> ~kitchen/.bashrc
provisioner:
name: salt_solo
salt_install: bootstrap
salt_version: 3004
salt_bootstrap_url: https://bootstrap.saltproject.io
salt_bootstrap_options: -X -x python3 -p git -p curl -p sudo stable 3004
pip_bin: pip3
formula: tests
require_chef: false
gpg_key: test@example.com
gpg_home: gpgkeys
cache_commands:
- touch %{sandbox_path}/srv/salt/cache_commands_test
init_environment: |
sudo mkdir -p /tmp/kitchen/var/cache/salt/master
salt_copy_filter:
- .filter_hidden
vendor_repo:
- type: apt
url: http://apt.mirantis.com/trusty
key_url: http://apt.mirantis.com/public.gpg
components: salt
distribution: nightly
- type: ppa
name: neovim-ppa/unstable
- type: spm
url: https://spm.hubblestack.io/2016.7.1
name: hubblestack
dependencies:
- name: foo
path: ./tests/formula-foo
- name: nginx
repo: apt
package: salt-formula-nginx
- name: linux
repo: git
source: https://github.com/salt-formulas/salt-formula-linux.git
- name: git
repo: git
source: https://github.com/gtmanfred/salt-formula-git.git
- name: postfix
repo: git
source: https://github.com/salt-formulas/salt-formula-postfix
- name: hubblestack_nova
repo: spm
package: https://spm.hubblestack.io/nova/hubblestack_nova-2016.10.1-1.spm
state_top:
base:
"*":
- tests.sudo
- git
pillars:
top.sls:
base:
"*":
- git
- gpgtest
pillars_from_directories:
- source: tests/pillars/
dest: srv/pillar/
grains:
noservices: True
platforms:
- name: ubuntu-18.04
driver:
run_command: '/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o PasswordAuthentication=yes -o PidFile=/tmp/sshd.pid'
provisioner:
salt_apt_repo: 'https://repo.saltproject.io/py3/ubuntu/18.04/amd64/archive'
salt_apt_repo_key: 'https://repo.saltproject.io/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub'
init_environment: |
sudo mkdir -p /tmp/kitchen/var/cache/salt/master
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y software-properties-common
salt_bootstrap_options: -X -x python3 -p git -p curl -p sudo -p software-properties-common stable 3004
- name: debian-10
provisioner:
salt_apt_repo: 'https://repo.saltproject.io/py3/debian/10/amd64/archive'
salt_apt_repo_key: 'https://repo.saltproject.io/py3/debian/10/amd64/latest/SALTSTACK-GPG-KEY.pub'
- name: centos-8
driver_config:
provision_command:
- echo . /etc/profile >> ~kitchen/.bashrc
- echo export LANG=en_US.UTF-8 >> ~kitchen/.bashrc
- sed -i '/secure_path/d' /etc/sudoers
- yum install -y epel-release
- yum install -y python3-pip python3-devel gcc git gcc-c++
provisioner:
salt_yum_repo: 'https://repo.saltproject.io/py3/redhat/8/x86_64/archive/%s'
salt_yum_rpm_key: 'https://repo.saltproject.io/py3/redhat/8/x86_64/latest/SALTSTACK-GPG-KEY.pub'
<% if @vagrant != false %>
- name: windows-2012r2
driver:
box: devopsgroup-io/windows_server-2012r2-standard-amd64-nocm
communicator: winrm
linked_clone: true
name: vagrant
gui: false
provisioner:
# On Osx 'brew install unix2dos' or Centos 'yum install tofrodos'
cache_commands:
- touch %{sandbox_path}/srv/salt/cache_commands_test
- find %{sandbox_path} -type f | xargs unix2dos
init_environment: |
Clear-Host
$AddedLocation ="c:\salt"
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
$NewPath= $OldPath + ’;’ + $AddedLocation
Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath
pillars:
top.sls:
base:
"*": []
salt_bootstrap_url: https://winbootstrap.saltproject.io/develop
salt_bootstrap_options: ''
salt_minion_extra_config:
file_roots:
base:
- C:\Users\vagrant\AppData\Local\Temp\kitchen\srv\salt
- C:\Users\vagrant\AppData\Local\Temp\kitchen\srv\salt\tests\formula-foo
state_top:
base:
"*":
- foo
dependencies:
- name: foo
path: ./tests/formula-foo
- name: hubblestack_nova
repo: spm
package: https://spm.hubblestack.io/nova/hubblestack_nova-2016.10.1-1.spm
- name: freebsd-11
driver:
box: bento/freebsd-11.0
name: vagrant
provisioner:
salt_bootstrap_options: -X -p git -p curl -p sudo -p bash -p py27-sqlite3
state_top:
base:
"*":
- tests.sudo
dependencies:
- name: foo
path: ./tests/formula-foo
- name: postfix
repo: git
source: https://github.com/salt-formulas/salt-formula-postfix
- name: hubblestack_nova
repo: spm
package: https://spm.hubblestack.io/nova/hubblestack_nova-2016.10.1-1.spm
<% end %>
suites:
- name: apt
provisioner:
salt_install: apt
includes:
- debian-9
- ubuntu-18.04
- ubuntu-16.04
- name: yum
provisioner:
salt_install: yum
init_environment: |
sudo mkdir -p /tmp/kitchen/var/cache/salt/master
sudo yum install -y git
includes:
- centos-7
- name: bootstrap
<% if @vagrant != false %>
excludes:
- freebsd-11
- windows-2012r2
<% end %>
- name: pip
provisioner:
salt_install: pip
<% if @vagrant != false %>
excludes:
- freebsd-11
- windows-2012r2
- name: vagrant
includes:
- freebsd-11
- windows-2012r2
<% end %>
verifier:
name: shell
remote_exec: false
command: pytest -v tests/integration/