blob: c247e49ae5a2a921c41d7bc3abbb2e1623e83982 [file] [log] [blame]
Jan Kundrát3a016432020-04-07 22:47:49 +02001---
2- name: Set coverage log path
3 set_fact:
4 log_path: "{{ zuul.executor.log_root }}/"
5 when: log_path is not defined
6
Jan Kundrát75c98ba2020-04-09 09:50:42 +02007- name: Check for coverage.xml
8 stat:
9 path: "{{ coverage_xml_dir }}/coverage.xml"
10 get_checksum: false
11 get_mime: false
12 get_md5: false
13 register: coverage_xml_stat
14
Jan Kundrát3a016432020-04-07 22:47:49 +020015- name: Collect coverage.xml
16 synchronize:
17 src: "{{ coverage_xml_dir }}/coverage.xml"
18 dest: "{{ log_path }}/coverage.xml"
19 mode: pull
Jan Kundrát75c98ba2020-04-09 09:50:42 +020020 when: coverage_xml_stat.stat.exists
Jan Kundrát3a016432020-04-07 22:47:49 +020021
22- name: Return site artifact location to Zuul
Jan Kundrát75c98ba2020-04-09 09:50:42 +020023 when: coverage_xml_stat.stat.exists
Jan Kundrát3a016432020-04-07 22:47:49 +020024 zuul_return:
25 data:
26 zuul:
27 artifacts:
28 - name: "Coverage data"
29 metadata:
30 type: "cobertura_xml"
31 url: "coverage.xml"