From 7fcc8e9fd2714141a44cd9454bdb14f7c8b2aad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Thu, 19 Sep 2024 16:03:10 +0200 Subject: [PATCH] bugfix: transfer of report.yaml must work with pod as well (#755) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bugfix: transfer of report.yaml must work with pod as well * fix output directory Signed-off-by: Matthias Büchse Co-authored-by: Artem Goncharov --- playbooks/compliance_check.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/playbooks/compliance_check.yaml b/playbooks/compliance_check.yaml index 1871d5896..1bf4d246b 100644 --- a/playbooks/compliance_check.yaml +++ b/playbooks/compliance_check.yaml @@ -3,20 +3,16 @@ hosts: all tasks: - name: Run compliance script + # write report.yaml into the proper directory so it will be transferred back by base job + # -- this then works regardless of VM/pod ansible.builtin.command: - cmd: python3 Tests/scs-test-runner.py --config Tests/config.toml --debug run --preset {{ preset }} --output report.yaml + cmd: > + python3 Tests/scs-test-runner.py --config Tests/config.toml --debug + run --preset {{ preset }} + --output "{{ ansible_user_dir }}/zuul-output/artifacts/report.yaml" chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" changed_when: true - - name: Copy result YAML - ansible.builtin.synchronize: - dest: "{{ zuul.executor.log_root }}/report.yaml" - mode: pull - src: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/report.yaml" - verify_host: true - owner: no - group: no - - name: Return artifact URL zuul_return: data: