From 484dadcab064353cbbc866b3e8dc7027c18f38a7 Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Fri, 4 Nov 2016 10:16:06 -0400 Subject: [PATCH] Expose the tempest results to the top level of the collected logs * soft link the tempest.html file to the base of collected logs dir if the tempest results exist. * fetch the xml results for jenkins to parse if the file exists Change-Id: I0eccf093f6ca12ca6ff1d4697b6d64f20dca2e69 --- roles/collect-logs/tasks/collect.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/roles/collect-logs/tasks/collect.yml b/roles/collect-logs/tasks/collect.yml index 5e90fb8cf..1a5f3a76c 100644 --- a/roles/collect-logs/tasks/collect.yml +++ b/roles/collect-logs/tasks/collect.yml @@ -223,3 +223,24 @@ command: gzip -d -r "{{ artcl_collect_dir }}/stackviz" when: stackviz.stat.exists + # Collect the tempest artifacts for reporting + - name: check for tempest html results + stat: path="{{ artcl_collect_dir }}/undercloud/home/stack/tempest/tempest.html.gz" + register: st_tempest_html + + - name: unzip the tempest html file + command: gzip -d "{{ artcl_collect_dir }}/undercloud/home/stack/tempest/tempest.html.gz" + when: st_tempest_html.stat.exists + + - name: check for tempest xml results + stat: path="{{ artcl_collect_dir }}/undercloud/home/stack/tempest/tempest.xml.gz" + register: st_tempest_xml + + - name: unzip the tempest xml file + command: gzip -d "{{ artcl_collect_dir }}/undercloud/home/stack/tempest/tempest.xml.gz" + when: st_tempest_xml.stat.exists + + - name: Copy the tempest html to the base dir of the logs + command: cp -r "{{ artcl_collect_dir }}/undercloud/home/stack/tempest/tempest.html" {{ artcl_collect_dir }}/tempest.html + when: st_tempest_html.stat.exists +