Add zuul.executor.work_root to inventory

It is helpful to expose the work_root into the inventory. Today, we
would need to use a relative path on log_root or src_root. Having the
absolute path is better to read for debugging.

Change-Id: I86ff459d283eaf348821c2f11c1f8575598f088d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/73/490173/1
Paul Belanger 5 years ago
parent 6665c1a358
commit 1cf39c0b0d
  1. 2
      doc/source/user/jobs.rst
  2. 3
      tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
  3. 1
      zuul/executor/server.py

@ -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:

@ -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'
- vartest_site == 'vartest_site'

@ -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)

Loading…
Cancel
Save