Monty Taylor 3d0550a96c
Revert "Revert "Add consolidated role for processing subunit""
This reverts commit 9f4efe98e10c9d553dc8a15bd7b84584e1118684.

Compress testr results.html before fetching it

The synchronize command has testr_results.html.gz in the file list, but
we don't ever gzip it so it fails on fetch.

Make the "Check for testr directory" task actually check for
.testrepository and not for .stestr a second time.

The compression bug broke only for people using stestr. For people
using testr, the path bug meant they don't get html reports.

Change-Id: I0cdfc66ee8b046affeb0b071fef38c21cb7a4948
2018-01-16 11:58:18 -06:00

23 lines
648 B
YAML

- name: Generate testr_results.html file
# TODO(pabelanger): We cannot depend on /usr/os-testr-env here!!!
command: "/usr/os-testr-env/bin/subunit2html ./testrepository.subunit testr_results.html"
args:
chdir: "{{ zuul_work_dir }}"
- name: Compress testrepository files
archive:
path: "{{ zuul_work_dir }}/{{ item }}"
with_items:
- testrepository.subunit
- testr_results.html
- name: Collect test-results
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
src: "{{ zuul_work_dir }}/{{ item }}"
verify_host: true
with_items:
- "*testr_results.html.gz"
- "*testrepository.subunit.gz"