Respect per-project work dir when preparing submodules
E.g., when we trigger the `czechlight-clearfog` job, it should run
against project `CzechLight/br2-external` even if the triggering project
is, say, `CzechLight/netconf-cli`.
Change-Id: Ia27ffd37071ad39e185ba8f13c9f8d174dcf9726
diff --git a/roles/git-submodules/tasks/main.yaml b/roles/git-submodules/tasks/main.yaml
index 100de13..65fdc87 100644
--- a/roles/git-submodules/tasks/main.yaml
+++ b/roles/git-submodules/tasks/main.yaml
@@ -19,7 +19,7 @@
done
# 3) Update submodules via calling out to git
- cd "$(jq -r '.project.src_dir' ~/zuul-env.json)"
+ cd "{{ zuul_work_dir | default(zuul.project.src_dir) }}"
git submodule update --init --recursive
# 4) Undo changes made in step 1