From 029fcd8c318a6e4ea392253be868f065678d1f9b Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: May 12 2022 12:45:38 +0000 Subject: [PATCH 1/2] Make testdir ready in the tests/ namespace --- diff --git a/roles/run-tests-yml/tasks/main.yaml b/roles/run-tests-yml/tasks/main.yaml index c2826c1..b6a1ebd 100644 --- a/roles/run-tests-yml/tasks/main.yaml +++ b/roles/run-tests-yml/tasks/main.yaml @@ -12,8 +12,18 @@ use_backend: "dnf" become: yes +- stat: + path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests" + register: testdir + - set_fact: tests_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests" + when: testdir.stat.exists + +# We might be in repo on the tests/ namespace +- set_fact: + tests_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/" + when: not testdir.stat.exists - name: Ensure tests/artifacts exists file: From 1b7ea8ba132501ff53c51bf39173e353fa130906 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: May 13 2022 06:48:40 +0000 Subject: [PATCH 2/2] fetch-tests-yml-artifacts: Make testdir ready in the tests/ namespace --- diff --git a/roles/fetch-tests-yml-artifacts/tasks/main.yml b/roles/fetch-tests-yml-artifacts/tasks/main.yml index cb9190b..01f41d2 100644 --- a/roles/fetch-tests-yml-artifacts/tasks/main.yml +++ b/roles/fetch-tests-yml-artifacts/tasks/main.yml @@ -1,5 +1,15 @@ +- stat: + path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests" + register: testdir + - set_fact: tests_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests" + when: testdir.stat.exists + +# We might be in repo on the tests/ namespace +- set_fact: + tests_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/" + when: not testdir.stat.exists - name: Fetch test artifacts synchronize: