Allow for specifying root job directory

The finger log streamer will look in the root job dir to
find job logs.

Change-Id: Ib585e04e890cf73bd254d3ba4e7ac3cf01cd342c
This commit is contained in:
David Shrewsbury 2017-04-13 12:08:29 -04:00
parent 4dd45f5e1b
commit d678429560
2 changed files with 10 additions and 0 deletions

View File

@ -108,6 +108,10 @@ layout.yaml to be useful.
commands. commands.
``state_dir=/var/lib/zuul`` ``state_dir=/var/lib/zuul``
**jobroot_dir**
Path to directory that Zuul should store temporary job files.
``jobroot_dir=/tmp``
**report_times** **report_times**
Boolean value (``true`` or ``false``) that determines if Zuul should Boolean value (``true`` or ``false``) that determines if Zuul should
include elapsed times for each job in the textual report. Used by include elapsed times for each job in the textual report. Used by

View File

@ -79,8 +79,14 @@ class Executor(zuul.cmd.ZuulApp):
self.log = logging.getLogger("zuul.Executor") self.log = logging.getLogger("zuul.Executor")
jobroot_dir = None
if self.config.has_option('zuul', 'jobroot_dir'):
jobroot_dir = os.path.expanduser(
self.config.get('zuul', 'jobroot_dir'))
ExecutorServer = zuul.executor.server.ExecutorServer ExecutorServer = zuul.executor.server.ExecutorServer
self.executor = ExecutorServer(self.config, self.connections, self.executor = ExecutorServer(self.config, self.connections,
jobdir_root=jobroot_dir,
keep_jobdir=self.args.keep_jobdir) keep_jobdir=self.args.keep_jobdir)
self.executor.start() self.executor.start()