From 3b0fa71dd20e5d6535b44f058719f6d595347d37 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Sat, 18 Jan 2020 13:18:29 +0100 Subject: [PATCH] Return subunit test report as artifact When returning the subunit test result as an artifact it will be directly linked on the build result page. Change-Id: I1a83288ac0857333f87cd085b3e0243bd3b92fc2 --- roles/fetch-subunit-output/tasks/process.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/fetch-subunit-output/tasks/process.yaml b/roles/fetch-subunit-output/tasks/process.yaml index 4556afc40..3530e37ad 100644 --- a/roles/fetch-subunit-output/tasks/process.yaml +++ b/roles/fetch-subunit-output/tasks/process.yaml @@ -23,3 +23,15 @@ src: "{{ item.path }}" verify_host: true with_items: "{{ subunit_files.files }}" + +- name: Return artifact to Zuul + zuul_return: + data: + zuul: + artifacts: + - name: "Unit Test Report" + url: "testr_results.html" + metadata: + type: unit_test_report + when: "'testr_results.html' in item.path" + with_items: "{{ subunit_files.files }}"