Create zuul_workspace_root job variable
This will be a top-level variable used to define the workspace root
for our zuul user.
Change-Id: I4ecd6ead4975691798404f8d9510ed47e20e0c0c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/playbooks/roles/extra-test-setup/tasks/main.yaml b/playbooks/roles/extra-test-setup/tasks/main.yaml
index 08e46f3..da4259e 100644
--- a/playbooks/roles/extra-test-setup/tasks/main.yaml
+++ b/playbooks/roles/extra-test-setup/tasks/main.yaml
@@ -1,13 +1,13 @@
---
-- name: Check if tools/test-setup.sh exists.
+- name: Check if projects tools/test-setup.sh exists.
stat:
- path: "/home/zuul/workspace/src/{{ zuul.project }}/tools/test-setup.sh"
+ path: "{{ zuul_workspace_root }}/src/{{ zuul.project }}/tools/test-setup.sh"
register: p
- name: Run tools/test-setup.sh.
shell: tools/test-setup.sh
args:
- chdir: "/home/zuul/workspace/src/{{ zuul.project }}"
+ chdir: "{{ zuul_workspace_root }}/src/{{ zuul.project }}"
when:
- p.stat.exists
- p.stat.executable