
Fetch the validation.json files and other validations log file to improve debuging and failures investigation. Right now, we collect only ansible artifacts. Change-Id: Icd4536cea0d83910594a52175fc31fe9a36b4659
44 lines
981 B
YAML
44 lines
981 B
YAML
---
|
|
- name: Ensure local output dirs
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ vf_output_dir }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ log_path }}/validations-logs"
|
|
- "{{ zuul.executor.work_root }}/artifacts"
|
|
loop_control:
|
|
loop_var: vf_output_dir
|
|
|
|
- name: Collect logs and artifacts
|
|
synchronize:
|
|
dest: "{{ vf_output.dest }}/"
|
|
mode: pull
|
|
src: "{{ output_dir }}/{{ vf_output.src }}/"
|
|
verify_host: true
|
|
owner: false
|
|
group: false
|
|
loop:
|
|
- dest: "{{ log_path }}/validations-logs"
|
|
src: "artifacts"
|
|
loop_control:
|
|
loop_var: vf_output
|
|
|
|
- name: Find validations data
|
|
find:
|
|
paths: "{{ output_dir }}"
|
|
patterns: "*.json,*.log"
|
|
register: validation_json
|
|
|
|
- name: Collect Validation logs
|
|
synchronize:
|
|
dest: "{{ log_path }}/validations-logs/"
|
|
mode: pull
|
|
src: "{{ logs.path }}"
|
|
verify_host: true
|
|
owner: false
|
|
group: false
|
|
loop: "{{ validation_json.files }}"
|
|
loop_control:
|
|
loop_var: logs
|