.kitchen.yml 6.6 KB

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