rally-openstack/tests/ci/playbooks/fetch-html-and-json-reports.yaml
Andrey Kurilin e73a897642 [ci] Include pytest html reports for functional job
Change-Id: I35c68ab5ad3ff9ac2f12f383489a18d55d2d0bf1
2024-01-09 17:19:05 +01:00

42 lines
1.3 KiB
YAML

- hosts: all
vars:
html_report: "{% if non_default_html_report is defined %}{{ non_default_html_report }}{% else %}{{ tox_env | default('self') }}_report.html{% endif %}"
json_report: "{{ tox_env | default('self') }}_report.json"
tasks:
- shell: "ls {{ rally_results_dir }}"
register: results_dir_stat
ignore_errors: True
- name: Save results
become: yes
when: results_dir_stat.rc == 0
synchronize:
src: "{{ rally_results_dir }}{% if not rally_results_dir.endswith('/')%}/{% endif %}"
dest: '{{ zuul.executor.log_root }}/'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/**
- --include=*/
- --exclude=*
- --prune-empty-dirs
- name: "Return artifact to Zuul - {{ html_report }}"
zuul_return:
data:
zuul:
artifacts:
- name: "HTML report"
url: "{{ html_report }}"
when: html_report in results_dir_stat.stdout
- name: "Return artifact to Zuul - {{ json_report}}"
zuul_return:
data:
zuul:
artifacts:
- name: "JSON report"
url: "{{ json_report }}"
when: json_report in results_dir_stat.stdout