From c2ae611ee89173bc0888b9f37d51b934dcb2ee49 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 7 Oct 2021 10:26:51 +0100 Subject: [PATCH] CI: always return host configure test results 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 --- .../run.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/playbooks/kayobe-overcloud-host-configure-base/run.yml b/playbooks/kayobe-overcloud-host-configure-base/run.yml index 45876df49..9320816ed 100644 --- a/playbooks/kayobe-overcloud-host-configure-base/run.yml +++ b/playbooks/kayobe-overcloud-host-configure-base/run.yml @@ -16,6 +16,16 @@ 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: @@ -30,13 +40,3 @@ decrypt --vault-password-file {{ kayobe_venv }}/bin/kayobe-vault-password-helper {{ kayobe_config_src_dir }}/etc/kayobe/kolla/passwords.yml - - - 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