diff --git a/playbooks/unittests/post.yaml b/playbooks/unittests/post.yaml index 3429000fc..b448ca523 100644 --- a/playbooks/unittests/post.yaml +++ b/playbooks/unittests/post.yaml @@ -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 diff --git a/roles/fetch-testr-output/defaults/main.yaml b/roles/fetch-testr-output/defaults/main.yaml new file mode 100644 index 000000000..a0afa22c5 --- /dev/null +++ b/roles/fetch-testr-output/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/fetch-testr-output/tasks/main.yaml b/roles/fetch-testr-output/tasks/main.yaml new file mode 100644 index 000000000..163226322 --- /dev/null +++ b/roles/fetch-testr-output/tasks/main.yaml @@ -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" diff --git a/zuul.yaml b/zuul.yaml index 298c716d1..e47215e6c 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -9,6 +9,7 @@ roles: - zuul: openstack-infra/zuul-jobs pre-run: playbooks/unittests/pre + post-run: playbooks/unittests/post - job: name: tox