Petr Michalec | 7904774 | 2018-05-09 22:04:27 +0200 | [diff] [blame] | 1 | --- |
| 2 | driver: |
| 3 | name: docker |
| 4 | priviledged: false |
| 5 | use_sudo: false |
| 6 | volume: |
| 7 | - <%= ENV['PWD'] %>:/tmp/kitchen |
| 8 | |
| 9 | |
| 10 | provisioner: |
| 11 | name: shell |
| 12 | script: .kitchen-verify.sh |
| 13 | |
| 14 | |
| 15 | verifier: |
| 16 | name: inspec |
| 17 | |
| 18 | <%- pyver = ENV['PYTHON_VERSION'] || '2.7' %> |
| 19 | |
| 20 | platforms: |
| 21 | <% `find test/model -maxdepth 1 -mindepth 1 -type d |sort -u`.split().each do |model| %> |
| 22 | <% model=model.split('/')[2] %> |
| 23 | - name: <%= model %> |
| 24 | driver_config: |
| 25 | image: python:<%= pyver %> |
| 26 | platform: ubuntu |
| 27 | hostname: reclass |
| 28 | provision_command: |
| 29 | #FIXME, setup reclass env (prereq, configs, upload models) |
| 30 | #- apt-get install -y rsync |
| 31 | - echo " |
| 32 | export LC_ALL=C.UTF-8;\n |
| 33 | export LANG=C.UTF-8;\n |
| 34 | export PYVER=<%= pyver %>;\n |
| 35 | export MODEL=<%= model %>;\n |
| 36 | " > /kitchen.env |
| 37 | <% end %> |
| 38 | |
| 39 | suites: |
| 40 | - name: model |
| 41 | |