salt/.kitchen.yml

238 lines
7.2 KiB
YAML
Raw Normal View History

2017-10-12 19:37:24 +00:00
---
<% vagrant = system('gem list -i kitchen-vagrant 2>/dev/null >/dev/null') %>
2018-10-29 21:05:34 +00:00
<% version = '2018.3.3' %>
2017-10-16 16:29:23 +00:00
<% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %>
<% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %>
2017-12-29 21:22:06 +00:00
<% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %>
2017-10-16 16:29:23 +00:00
<% if File.exists?(driverfile) %>
<%= ERB.new(File.read(driverfile)).result %>
2017-10-16 16:29:23 +00:00
<% else %>
2017-10-12 19:37:24 +00:00
driver:
name: docker
use_sudo: false
hostname: salt
2017-10-12 19:37:24 +00:00
privileged: true
2018-01-03 21:43:42 +00:00
username: kitchen
2017-10-12 19:37:24 +00:00
volume:
- /var/run/docker.sock:/docker.sock
cap_add:
- sys_admin
disable_upstart: false
provision_command:
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
transport:
name: rsync
2017-10-16 16:29:23 +00:00
<% end %>
2017-10-12 19:37:24 +00:00
provisioner:
name: salt_solo
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X -p rsync git v<%= version %>
2018-06-28 20:43:08 +00:00
log_level: info
2018-01-03 21:43:42 +00:00
sudo: true
2017-10-12 19:37:24 +00:00
require_chef: false
2018-03-13 21:55:43 +00:00
retry_on_exit_code:
- 139
max_retries: 2
2017-10-12 19:37:24 +00:00
remote_states:
2018-04-10 14:15:50 +00:00
name: git://github.com/saltstack/salt-jenkins.git
branch: 2019.2
2017-10-12 19:37:24 +00:00
repo: git
testingdir: /testing
salt_copy_filter:
2018-06-07 17:48:07 +00:00
- __pycache__
- '*.pyc'
2017-10-12 19:37:24 +00:00
- .bundle
2018-06-07 17:48:07 +00:00
- .tox
2019-03-22 17:26:16 +00:00
- .nox
2017-10-12 19:37:24 +00:00
- .kitchen
- artifacts
2017-10-12 19:37:24 +00:00
- Gemfile.lock
state_top:
base:
"os:Windows":
- match: grain
- windows
2017-10-12 19:37:24 +00:00
"*":
- <%= ENV['KITCHEN_STATE'] || 'git.salt' %>
2018-03-09 22:50:00 +00:00
pillars:
top.sls:
base:
"*":
- jenkins
"os:Windows":
- match: grain
- windows
jenkins.sls:
testing_dir: "{{salt.config.get('root_dir')|replace('\\', '\\\\')}}/testing"
clone_repo: false
salttesting_namespec: salttesting==2017.6.1
windows.sls:
virtualenv_path: 'c:\Python27\Scripts\pip.exe'
2017-10-16 16:29:23 +00:00
<% if File.exists?(platformsfile) %>
<%= ERB.new(File.read(platformsfile)).result %>
2017-10-16 16:29:23 +00:00
<% else %>
2017-10-12 19:37:24 +00:00
platforms:
- name: fedora
driver_config:
image: fedora:latest
run_command: /usr/lib/systemd/systemd
provisioner:
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
2017-10-12 19:37:24 +00:00
- name: centos-7
driver_config:
run_command: /usr/lib/systemd/systemd
- name: centos-6
driver_config:
run_command: /sbin/init
provision_command:
- yum install -y upstart
provisioner:
salt_bootstrap_options: -P -p rsync -y -x python2.7 -X git v<%= version %> >/dev/null
2018-05-03 17:02:22 +00:00
- name: ubuntu-18.04
2017-10-12 19:37:24 +00:00
driver_config:
run_command: /lib/systemd/systemd
- name: ubuntu-16.04
driver_config:
run_command: /lib/systemd/systemd
- name: ubuntu-14.04
driver_config:
run_command: /sbin/init
provision_command:
- rm -f /sbin/initctl
- dpkg-divert --local --rename --remove /sbin/initctl
- name: debian-8
driver_config:
run_command: /lib/systemd/systemd
provision_command:
- apt-get install -y dbus
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
- name: debian-9
driver_config:
run_command: /lib/systemd/systemd
- name: arch
driver_config:
image: base/archlinux
run_command: /usr/lib/systemd/systemd
provision_command:
- pacman -Syu --noconfirm systemd
- systemctl enable sshd
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
provisioner:
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
2017-10-12 19:37:24 +00:00
- name: opensuse
driver_config:
run_command: /usr/lib/systemd/systemd
provision_command:
- systemctl enable sshd.service
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
provisioner:
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
2017-10-12 19:37:24 +00:00
<% if vagrant != false %>
- name: windows-2012r2
driver:
box: mwrock/Windows2012R2
name: vagrant
gui: true
2018-03-07 15:23:34 +00:00
transport:
name: winrm
username: Administrator
2017-10-12 19:37:24 +00:00
password: Pass@word1
provisioner:
init_environment: |
Clear-Host
2018-03-07 15:23:34 +00:00
$AddedLocation ="c:\salt;c:\salt\bin\Scripts"
2017-10-12 19:37:24 +00:00
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
2018-03-07 15:23:34 +00:00
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
$NewPath= $OldPath + ";" + $AddedLocation
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
2017-10-12 19:37:24 +00:00
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
salt_bootstrap_options: ''
2018-03-07 15:23:34 +00:00
verifier:
windows: true
types:
- unit
coverage_xml: false
save:
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
/salt/var/log/salt/minion: artifacts/logs/minion
2017-10-12 19:37:24 +00:00
- name: windows-2016
driver:
box: mwrock/Windows2016
name: vagrant
gui: true
customize:
cpus: 4
memory: 8192
transport:
name: winrm
2017-10-12 19:37:24 +00:00
username: Vagrant
password: vagrant
provisioner:
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
salt_bootstrap_options: -version <%= version %>
2017-10-12 19:37:24 +00:00
init_environment: |
Clear-Host
$AddedLocation ="c:\salt;c:\salt\bin\Scripts"
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
2018-03-07 15:23:34 +00:00
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
$NewPath= $OldPath + ";" + $AddedLocation
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
2017-10-12 19:37:24 +00:00
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
salt_bootstrap_options: ''
verifier:
windows: true
types:
- unit
coverage_xml: false
xml: /tmp/xml-unittests-output/
save:
/tmp/xml-unittests-output/: artifacts/
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
/salt/var/log/salt/minion: artifacts/logs/minion
2017-10-12 19:37:24 +00:00
<% end %>
2017-10-16 16:29:23 +00:00
<% end %>
2017-10-12 19:37:24 +00:00
suites:
- name: py2
2017-12-29 21:22:06 +00:00
verifier:
python_bin: python2.7
- name: py3
excludes:
- centos-6
- ubuntu-14.04
2017-12-29 21:22:06 +00:00
verifier:
python_bin: python3
provisioner:
pillars:
jenkins.sls:
py3: true
windows.sls:
virtualenv_path: 'c:\Python35\Scripts\pip.exe'
2017-12-29 21:22:06 +00:00
<% if File.exists?(verifierfile) %>
<%= ERB.new(File.read(verifierfile)).result %>
2017-10-12 19:37:24 +00:00
<% else %>
2017-12-29 21:22:06 +00:00
verifier:
name: runtests
sudo: true
run_destructive: true
transport: zeromq
2018-10-11 19:45:07 +00:00
enable_filenames: true
2017-12-29 21:22:06 +00:00
types:
- ssh
2017-12-29 22:00:54 +00:00
xml: /tmp/xml-unittests-output/
2017-12-29 21:22:06 +00:00
coverage_xml: /tmp/coverage.xml
2017-12-29 22:00:54 +00:00
save:
2017-12-30 18:00:03 +00:00
/tmp/xml-unittests-output: artifacts/
2017-12-29 22:00:54 +00:00
/tmp/coverage.xml: artifacts/coverage/coverage.xml
2018-01-23 14:38:36 +00:00
/tmp/kitchen/var/log/salt/minion: artifacts/logs/minion
2017-12-29 22:00:54 +00:00
/tmp/salt-runtests.log: artifacts/logs/salt-runtests.log
2017-10-12 19:37:24 +00:00
<% end %>