Jan Kundrát | 3a01643 | 2020-04-07 22:47:49 +0200 | [diff] [blame] | 1 | --- |
| 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át | 75c98ba | 2020-04-09 09:50:42 +0200 | [diff] [blame^] | 7 | - 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át | 3a01643 | 2020-04-07 22:47:49 +0200 | [diff] [blame] | 15 | - name: Collect coverage.xml |
| 16 | synchronize: |
| 17 | src: "{{ coverage_xml_dir }}/coverage.xml" |
| 18 | dest: "{{ log_path }}/coverage.xml" |
| 19 | mode: pull |
Jan Kundrát | 75c98ba | 2020-04-09 09:50:42 +0200 | [diff] [blame^] | 20 | when: coverage_xml_stat.stat.exists |
Jan Kundrát | 3a01643 | 2020-04-07 22:47:49 +0200 | [diff] [blame] | 21 | |
| 22 | - name: Return site artifact location to Zuul |
Jan Kundrát | 75c98ba | 2020-04-09 09:50:42 +0200 | [diff] [blame^] | 23 | when: coverage_xml_stat.stat.exists |
Jan Kundrát | 3a01643 | 2020-04-07 22:47:49 +0200 | [diff] [blame] | 24 | zuul_return: |
| 25 | data: |
| 26 | zuul: |
| 27 | artifacts: |
| 28 | - name: "Coverage data" |
| 29 | metadata: |
| 30 | type: "cobertura_xml" |
| 31 | url: "coverage.xml" |