From ac140feca08d80be566d2fe8a1b49b88d7b8c171 Mon Sep 17 00:00:00 2001 From: Michel Peterson Date: Tue, 27 Feb 2018 21:02:36 +0200 Subject: [PATCH] Use fetch-subunit-output role Currently there is a zuul-jobs role only used in this tempest job while other jobs mostly use fetch-subunit-output role. This changes tries to consolidate towards the most used role, to be able to clean up zuul-jobs a bit. Change-Id: I404760ba34767660f8816f48712e13dccad67440 Depends-On: https://review.openstack.org/548406 --- playbooks/post-tempest.yaml | 5 ++--- roles/process-stackviz/README.rst | 6 +++--- roles/process-stackviz/defaults/main.yaml | 2 +- roles/process-stackviz/tasks/main.yaml | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/playbooks/post-tempest.yaml b/playbooks/post-tempest.yaml index ab7a1bbfcf..4dde2c9a74 100644 --- a/playbooks/post-tempest.yaml +++ b/playbooks/post-tempest.yaml @@ -1,7 +1,6 @@ - hosts: all become: true roles: - - role: process-test-results - test_results_dir: '{{ devstack_base_dir }}/tempest' - tox_envdir: tempest + - role: fetch-subunit-output + zuul_work_dir: '{{ devstack_base_dir }}/tempest' - role: process-stackviz diff --git a/roles/process-stackviz/README.rst b/roles/process-stackviz/README.rst index 54c217bcfc..a8447d2355 100644 --- a/roles/process-stackviz/README.rst +++ b/roles/process-stackviz/README.rst @@ -16,7 +16,7 @@ the stackviz archive embedded in test images. The stage directory where the input data can be found and the output will be produced. -.. zuul:rolevar:: test_results_stage_name - :default: test_results +.. zuul:rolevar:: zuul_work_dir + :default: {{ devstack_base_dir }}/tempest - The name of the subunit file to be used as input. + Directory to work in. It has to be a fully qualified path. diff --git a/roles/process-stackviz/defaults/main.yaml b/roles/process-stackviz/defaults/main.yaml index c6a64d1faa..f3bc32b149 100644 --- a/roles/process-stackviz/defaults/main.yaml +++ b/roles/process-stackviz/defaults/main.yaml @@ -1,3 +1,3 @@ devstack_base_dir: /opt/stack stage_dir: "{{ ansible_user_dir }}" -test_results_stage_name: test_results +zuul_work_dir: "{{ devstack_base_dir }}/tempest" diff --git a/roles/process-stackviz/tasks/main.yaml b/roles/process-stackviz/tasks/main.yaml index 09de606425..82f8f3d8cf 100644 --- a/roles/process-stackviz/tasks/main.yaml +++ b/roles/process-stackviz/tasks/main.yaml @@ -9,11 +9,11 @@ - name: Check if subunit data exists stat: - path: "{{ stage_dir }}/{{ test_results_stage_name }}.subunit" + path: "{{ zuul_work_dir }}/testrepository.subunit" register: subunit_input - debug: - msg: "Subunit file could not be found at {{ stage_dir }}/{{ test_results_stage_name }}.subunit" + msg: "Subunit file could not be found at {{ zuul_work_dir }}/testrepository.subunit" when: not subunit_input.stat.exists - name: Install stackviz