| |
| # usage: `KITCHEN_LOCAL_YAML=.kitchen.openstack.yml kitchen test` |
| |
| # https://docs.chef.io/config_yml_kitchen.html |
| # https://github.com/test-kitchen/kitchen-openstack |
| |
| --- |
| driver: |
| name: openstack |
| openstack_auth_url: <%= ENV['OS_AUTH_URL'] %>/tokens |
| openstack_username: <%= ENV['OS_USERNAME'] || 'ci' %> |
| openstack_api_key: <%= ENV['OS_PASSWORD'] || 'ci' %> |
| openstack_tenant: <%= ENV['OS_TENANT_NAME'] || 'ci_jenkins' %> |
| |
| #floating_ip_pool: <%= ENV['OS_FLOATING_IP_POOL'] || 'nova' %> |
| key_name: <%= ENV['BOOTSTRAP_SSH_KEY_NAME'] || 'bootstrap_insecure' %> |
| private_key_path: <%= ENV['BOOTSTRAP_SSH_KEY_PATH'] || "#{ENV['HOME']}/.ssh/id_rsa_bootstrap_insecure" %> |
| |
| |
| platforms: |
| - name: ubuntu-14.04 |
| driver: |
| username: <%= ENV['OS_UBUNTU_IMAGE_USER'] || 'root' %> |
| image_ref: <%= ENV['OS_UBUNTU_IMAGE_REF'] || 'ubuntu-14-04-x64-1455869035' %> |
| flavor_ref: m1.medium |
| network_ref: |
| <% if ENV['OS_NETWORK_REF'] -%> |
| - <% ENV['OS_NETWORK_REF'] %> |
| <% else -%> |
| - ci-net |
| <% end -%> |
| # force update apt cache on the image |
| run_list: |
| - recipe[apt] |
| attributes: |
| apt: |
| compile_time_update: true |
| transport: |
| username: <%= ENV['OS_UBUNTU_IMAGE_USER'] || 'root' %> |
| |
| {%- if cookiecutter.kitchen_driver =='openstack' %} |
| |
| verifier: |
| name: {{ cookiecutter.kitchen_verifier }} |
| sudo: true |
| |
| |
| suites: |
| {%- if cookiecutter.kitchen_suites == "" %} |
| - name: default |
| # provisioner: |
| # pillars-from-files: |
| # {{ cookiecutter.kitchen_formula }}.sls: tests/pillar/default.sls |
| {%- else %} |
| {%- for suite in cookiecutter.kitchen_suites.split() %} |
| |
| - name: {{ suite }} |
| provisioner: |
| pillars-from-files: |
| {{ cookiecutter.kitchen_formula }}.sls: tests/pillar/{{suite}}.sls |
| {%- endfor %} |
| {%- endif %} |
| |
| {%- endif %} |
| |
| # vim: ft=yaml sw=2 ts=2 sts=2 tw=125 |