c2ae611ee8
Currently, the overcloud host configure test results are only returned on success, when they are least useful. This is because the zuul_return task is not reached when the test task fails. This change reorders the tasks to fix the issue. Change-Id: Ie572eda567782cc377767bd8d925145e2ad4bd61
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
---
|
|
- hosts: primary
|
|
environment:
|
|
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"
|
|
# Don't run container deployment.
|
|
KAYOBE_OVERCLOUD_CONTAINER_IMAGE_PULL: 0
|
|
KAYOBE_OVERCLOUD_SERVICE_DEPLOY: 0
|
|
KAYOBE_OVERCLOUD_POST_CONFIGURE: 0
|
|
KAYOBE_VAULT_PASSWORD: 'test-password'
|
|
vars:
|
|
testinfra_venv: ~/testinfra-venv
|
|
test_path: "{{ kayobe_src_dir }}/playbooks/kayobe-overcloud-host-configure-base/tests/"
|
|
tasks:
|
|
- name: Ensure overcloud is deployed
|
|
shell:
|
|
cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh &> {{ logs_dir }}/ansible/overcloud-deploy"
|
|
executable: /bin/bash
|
|
|
|
- name: Return artifact to Zuul
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "Unit Test Report"
|
|
url: "{{ inventory_hostname }}/test-results.html"
|
|
metadata:
|
|
type: unit_test_report
|
|
|
|
- name: Run testinfra tests
|
|
command: "{{ testinfra_venv }}/bin/py.test {{ test_path }} --html={{ logs_dir }}/test-results.html --self-contained-html"
|
|
environment:
|
|
SITE_MIRROR_FQDN: "{{ zuul_site_mirror_fqdn }}"
|
|
|
|
# Check that passwords are Vault encrypted.
|
|
- name: Decrypt passwords.yml using Ansible Vault
|
|
vars:
|
|
kayobe_venv: "{{ ansible_env.HOME }}/kayobe-venv"
|
|
command: >-
|
|
{{ kayobe_venv }}/bin/ansible-vault
|
|
decrypt
|
|
--vault-password-file {{ kayobe_venv }}/bin/kayobe-vault-password-helper
|
|
{{ kayobe_config_src_dir }}/etc/kayobe/kolla/passwords.yml
|