Actually run the unittests post playbooks

Put the tasks into a role so that we can set zuul_work_dir in
defaults.yaml so that this also works if we're setting a directory in a
variable.

Change-Id: I638f7682d086781178f2dc7517eb0fb09a5f2acd
This commit is contained in:
Monty Taylor 2017-07-10 15:38:15 -05:00
parent 05735e64e7
commit 2dfb08a49e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
4 changed files with 15 additions and 11 deletions

View File

@ -1,12 +1,3 @@
- hosts: all
tasks:
- name: Collect test-results
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
rsync_opts:
- "--ignore-missing-args"
src: "src/{{ zuul.project.canonical_name }}/{{ item }}"
with_items:
- "*testr_results.html.gz"
- "*testrepository.subunit.gz"
roles:
- fetch-testr-output

View File

@ -0,0 +1,2 @@
---
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -0,0 +1,10 @@
- name: Collect test-results
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
rsync_opts:
- "--ignore-missing-args"
src: "{{ zuul_work_dir }}/{{ item }}"
with_items:
- "*testr_results.html.gz"
- "*testrepository.subunit.gz"

View File

@ -9,6 +9,7 @@
roles:
- zuul: openstack-infra/zuul-jobs
pre-run: playbooks/unittests/pre
post-run: playbooks/unittests/post
- job:
name: tox