1
0

kitchen.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. ---
  2. <% vagrant = system('gem list -i kitchen-vagrant 2>/dev/null >/dev/null') %>
  3. <% version = '2018.3.3' %>
  4. <% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %>
  5. <% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %>
  6. <% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %>
  7. <% if File.exists?(driverfile) %>
  8. <%= ERB.new(File.read(driverfile)).result %>
  9. <% else %>
  10. driver:
  11. name: docker
  12. use_sudo: false
  13. hostname: salt
  14. privileged: false
  15. username: kitchen
  16. env_variables:
  17. LANG: en_US.utf8
  18. volume:
  19. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  20. - /var/run/docker.sock:/docker.sock
  21. tmpfs:
  22. - /tmp:exec
  23. - /run
  24. disable_upstart: false
  25. provision_command:
  26. - systemctl enable sshd
  27. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  28. run_command: /sbin/init
  29. transport:
  30. name: rsync
  31. <% end %>
  32. provisioner:
  33. name: salt_solo
  34. salt_version: false
  35. salt_install: false
  36. run_salt_call: false
  37. install_after_init_environment: false
  38. log_level: info
  39. sudo: true
  40. require_chef: false
  41. retry_on_exit_code:
  42. - 139
  43. max_retries: 2
  44. salt_copy_filter:
  45. - __pycache__
  46. - '*.pyc'
  47. - .bundle
  48. - .tox
  49. - .nox
  50. - .kitchen
  51. - artifacts
  52. - Gemfile.lock
  53. # Remote states needs to be defined and under it testingdir or else
  54. # the local directory isn't copied over to the VM's/Containers that
  55. # get spun up.
  56. remote_states:
  57. testingdir: /testing
  58. state_top: {}
  59. pillars: {}
  60. <% if File.exists?(platformsfile) %>
  61. <%= ERB.new(File.read(platformsfile)).result %>
  62. <% else %>
  63. platforms:
  64. - name: arch
  65. driver_config:
  66. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-arch-lts' %>
  67. - name: amazon-2
  68. driver_config:
  69. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-amazon-2' %>
  70. - name: centos-7
  71. driver_config:
  72. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-centos-7' %>
  73. - name: centos-8
  74. driver_config:
  75. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-centos-8' %>
  76. - name: debian-9
  77. driver_config:
  78. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-debian-9' %>
  79. provision_command:
  80. - systemctl enable ssh
  81. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  82. - name: debian-10
  83. driver_config:
  84. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-debian-10' %>
  85. provision_command:
  86. - systemctl enable ssh
  87. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  88. - name: fedora-31
  89. driver_config:
  90. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-fedora-31' %>
  91. - name: fedora-32
  92. driver_config:
  93. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-fedora-32' %>
  94. - name: opensuse-15
  95. driver_config:
  96. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-opensuse-15' %>
  97. - name: ubuntu-16.04
  98. driver_config:
  99. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-1604' %>
  100. provision_command:
  101. - systemctl enable ssh
  102. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  103. - name: ubuntu-18.04
  104. driver_config:
  105. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-1804' %>
  106. provision_command:
  107. - systemctl enable ssh
  108. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  109. - name: ubuntu-20.04
  110. driver_config:
  111. image: <%= ENV['SALT_DOCKER_IMAGE'] || 'saltstack/ci-ubuntu-2004' %>
  112. provision_command:
  113. - systemctl enable ssh
  114. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  115. <% if vagrant != false %>
  116. - name: windows-2012r2
  117. driver:
  118. box: mwrock/Windows2012R2
  119. name: vagrant
  120. gui: true
  121. transport:
  122. name: winrm
  123. username: Administrator
  124. password: Pass@word1
  125. provisioner:
  126. init_environment: |
  127. Clear-Host
  128. $AddedLocation ="c:\salt;c:\salt\bin\Scripts"
  129. $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
  130. $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
  131. $NewPath= $OldPath + ";" + $AddedLocation
  132. Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
  133. reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
  134. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
  135. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  136. salt_bootstrap_options: ''
  137. - name: windows-2016
  138. driver:
  139. box: mwrock/Windows2016
  140. name: vagrant
  141. gui: true
  142. customize:
  143. cpus: 4
  144. memory: 8192
  145. transport:
  146. name: winrm
  147. username: Vagrant
  148. password: vagrant
  149. provisioner:
  150. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  151. salt_bootstrap_options: -version <%= version %>
  152. init_environment: |
  153. Clear-Host
  154. $AddedLocation ="c:\salt;c:\salt\bin\Scripts"
  155. $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
  156. $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
  157. $NewPath= $OldPath + ";" + $AddedLocation
  158. Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
  159. reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
  160. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
  161. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  162. salt_bootstrap_options: ''
  163. <% end %>
  164. <% end %>
  165. suites:
  166. - name: py3
  167. <% if File.exists?(verifierfile) %>
  168. <%= ERB.new(File.read(verifierfile)).result %>
  169. <% else %>
  170. verifier:
  171. name: nox
  172. run_destructive: true
  173. coverage: true
  174. junitxml: true
  175. sudo: true
  176. transport: zeromq
  177. sysinfo: true
  178. sys_stats: true
  179. <% end %>