diff --git a/doc/source/user/jobs.rst b/doc/source/user/jobs.rst index b6a85649a7..f533f54856 100644 --- a/doc/source/user/jobs.rst +++ b/doc/source/user/jobs.rst @@ -322,6 +322,8 @@ executor running the job is available: **zuul.executor.log_root** The path to the logs directory. +**zuul.executor.work_root** + The path to the working directory. .. _user_sitewide_variables: diff --git a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml index 3f62c4cfd1..cd343d0b1c 100644 --- a/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml +++ b/tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml @@ -13,6 +13,7 @@ - zuul.executor.hostname is defined - zuul.executor.src_root is defined - zuul.executor.log_root is defined + - zuul.executor.work_root is defined - name: Assert zuul.project variables are valid. assert: @@ -29,4 +30,4 @@ that: - vartest_job == 'vartest_job' - vartest_secret.value == 'vartest_secret' - - vartest_site == 'vartest_site' \ No newline at end of file + - vartest_site == 'vartest_site' diff --git a/zuul/executor/server.py b/zuul/executor/server.py index 22ca59ff91..b166111542 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -1350,6 +1350,7 @@ class AnsibleJob(object): hostname=self.executor_server.hostname, src_root=self.jobdir.src_root, log_root=self.jobdir.log_root, + work_root=self.jobdir.work_root, result_data_file=self.jobdir.result_data_file) nodes = self.getHostList(args)