Merge "Temporary fetch logs adjustement to detect log folder"

This commit is contained in:
Zuul 2021-05-19 16:44:51 +00:00 committed by Gerrit Code Review
commit 349a7f0b8f
1 changed files with 15 additions and 2 deletions

View File

@ -10,11 +10,24 @@
loop_control: loop_control:
loop_var: vf_output_dir loop_var: vf_output_dir
# TODO(jpodivin):
# This is a temporary construct to bridge the time span
# when new log path handling is being tested but isn't merged yet
- name: Discover new log dir
stat:
path: "{{ output_dir }}/validations"
register: new_log_dir
- name: Set log dir
set_fact:
available_log_dir: "{{'validations' if new_log_dir.stat.exists else 'artifacts'}}"
# End of the temporary construct
- name: Collect logs and artifacts - name: Collect logs and artifacts
synchronize: synchronize:
dest: "{{ log_path }}/validations-logs" dest: "{{ log_path }}/validations-logs/"
mode: pull mode: pull
src: "{{ output_dir }}/artifacts/" src: "{{ output_dir }}/{{ available_log_dir }}/"
verify_host: true verify_host: true
owner: false owner: false
group: false group: false