summaryrefslogtreecommitdiff
path: root/tasks/artifacts.yml
blob: 1a1b6020b95cc23eabe9f2270bb49aa5f2f03843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- name: Retrieve certification test results
  become: true
  shell: >
    set -o pipefail &&
    rhcert-ci print --format {{ openstack_certification_output_format }} | tail -n +2 | tee {{ openstack_certification_output_filename }}
  args:
    creates: '{{ openstack_certification_output_filename }}'

- name: Download output file
  become: true
  fetch:
    src: '{{ openstack_certification_output_filename }}'
    dest: "{{ openstack_certification_dest_dir }}/{{ openstack_certification_output_filename.split('.')[0] }}_{{ ansible_hostname }}.\
      {{ openstack_certification_output_filename.split('.')[1] }}"
    flat: true

- block:
    - name: Compress results file
      become: true
      archive:
        path: /var/rhcert/results.xml
        format: gz

    - name: Download results file
      become: true
      fetch:
        src: '/var/rhcert/results.xml.gz'
        dest: "{{ openstack_certification_dest_dir }}/certification_{{ ansible_hostname }}.xml.gz"
        flat: true
  when: openstack_certification_results_download|bool