.kitchen.yml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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. pillars:
  58. jenkins.sls:
  59. testing_dir: "{{salt.config.get('root_dir')|replace('\\', '\\\\')}}/testing"
  60. state_top: {}
  61. <% if File.exists?(platformsfile) %>
  62. <%= ERB.new(File.read(platformsfile)).result %>
  63. <% else %>
  64. platforms:
  65. - name: arch
  66. driver_config:
  67. image: saltstack/ci-arch:<%= golden_images_branch %>
  68. run_command: /usr/lib/systemd/systemd
  69. - name: amazon-1
  70. driver_config:
  71. image: saltstack/ci-amazon-1:<%= golden_images_branch %>
  72. run_command: /usr/lib/systemd/systemd
  73. - name: amazon-2
  74. driver_config:
  75. image: saltstack/ci-amazon-2:<%= golden_images_branch %>
  76. run_command: /usr/lib/systemd/systemd
  77. - name: centos-6
  78. driver_config:
  79. image: saltstack/ci-centos-6:<%= golden_images_branch %>
  80. run_command: /sbin/init
  81. provision_command:
  82. - name: centos-7
  83. driver_config:
  84. image: saltstack/ci-centos-7:<%= golden_images_branch %>
  85. run_command: /usr/lib/systemd/systemd
  86. - name: debian-9
  87. driver_config:
  88. image: saltstack/ci-debian-9:<%= golden_images_branch %>
  89. run_command: /lib/systemd/systemd
  90. run_options: --entrypoint=/lib/systemd/systemd
  91. provision_command:
  92. - systemctl enable ssh
  93. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  94. - name: debian-10
  95. driver_config:
  96. image: saltstack/ci-debian-10:<%= golden_images_branch %>
  97. run_command: /lib/systemd/systemd
  98. run_options: --entrypoint=/lib/systemd/systemd
  99. provision_command:
  100. - systemctl enable ssh
  101. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  102. - name: fedora-29
  103. driver_config:
  104. image: saltstack/ci-fedora-29:<%= golden_images_branch %>
  105. run_command: /usr/lib/systemd/systemd
  106. - name: fedora-30
  107. driver_config:
  108. image: saltstack/ci-fedora-30:<%= golden_images_branch %>
  109. run_command: /usr/lib/systemd/systemd
  110. - name: opensuse-15
  111. driver_config:
  112. image: saltstack/ci-opensuse-15:<%= golden_images_branch %>
  113. run_command: /usr/lib/systemd/systemd
  114. - name: ubuntu-16.04
  115. driver_config:
  116. image: saltstack/ci-ubuntu-1604:<%= golden_images_branch %>
  117. run_command: /lib/systemd/systemd
  118. run_options: --entrypoint=/lib/systemd/systemd
  119. provision_command:
  120. - systemctl enable ssh
  121. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  122. - name: ubuntu-18.04
  123. driver_config:
  124. image: saltstack/ci-ubuntu-1804:<%= golden_images_branch %>
  125. run_command: /lib/systemd/systemd
  126. run_options: --entrypoint=/lib/systemd/systemd
  127. provision_command:
  128. - systemctl enable ssh
  129. - echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
  130. <% if vagrant != false %>
  131. - name: windows-2012r2
  132. driver:
  133. box: mwrock/Windows2012R2
  134. name: vagrant
  135. gui: true
  136. transport:
  137. name: winrm
  138. username: Administrator
  139. password: Pass@word1
  140. provisioner:
  141. init_environment: |
  142. Clear-Host
  143. $AddedLocation ="c:\salt;c:\salt\bin\Scripts"
  144. $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
  145. $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
  146. $NewPath= $OldPath + ";" + $AddedLocation
  147. Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
  148. reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
  149. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
  150. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  151. salt_bootstrap_options: ''
  152. - name: windows-2016
  153. driver:
  154. box: mwrock/Windows2016
  155. name: vagrant
  156. gui: true
  157. customize:
  158. cpus: 4
  159. memory: 8192
  160. transport:
  161. name: winrm
  162. username: Vagrant
  163. password: vagrant
  164. provisioner:
  165. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  166. salt_bootstrap_options: -version <%= version %>
  167. init_environment: |
  168. Clear-Host
  169. $AddedLocation ="c:\salt;c:\salt\bin\Scripts"
  170. $Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
  171. $OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
  172. $NewPath= $OldPath + ";" + $AddedLocation
  173. Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
  174. reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
  175. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
  176. salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
  177. salt_bootstrap_options: ''
  178. <% end %>
  179. <% end %>
  180. suites:
  181. - name: py2
  182. - name: py3
  183. excludes:
  184. - centos-6
  185. <% if File.exists?(verifierfile) %>
  186. <%= ERB.new(File.read(verifierfile)).result %>
  187. <% else %>
  188. verifier:
  189. name: nox
  190. pytest: true
  191. run_destructive: true
  192. coverage: true
  193. junitxml: true
  194. sudo: true
  195. transport: zeromq
  196. sysinfo: true
  197. sys_stats: true
  198. <% end %>