kitchen.yml 7.3 KB

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