From 48c99bdcf8cc6d0284bcbff4049884aa890d5344 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Wed, 5 May 2021 13:02:01 +0200 Subject: [PATCH] Temporary fetch logs adjustement to detect log folder fetch_validations role detects presence of the new log folder, created via the new log path mechanism introduced in the 36c9b8cbcbdfe35ba9b10b72c5b52a56c4ce9099 of the validations-libs. The task should be removed once the related validations-libs patch is safely merged. Signed-off-by: Jiri Podivin Change-Id: I1a49dc16f65652ad7b1d9736d333c502d563870a --- roles/fetch_validations/tasks/main.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/roles/fetch_validations/tasks/main.yaml b/roles/fetch_validations/tasks/main.yaml index a0338cc..58348e6 100644 --- a/roles/fetch_validations/tasks/main.yaml +++ b/roles/fetch_validations/tasks/main.yaml @@ -10,11 +10,24 @@ loop_control: 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 synchronize: - dest: "{{ log_path }}/validations-logs" + dest: "{{ log_path }}/validations-logs/" mode: pull - src: "{{ output_dir }}/artifacts/" + src: "{{ output_dir }}/{{ available_log_dir }}/" verify_host: true owner: false group: false