Allow for specifying root job directory

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

Change-Id: Ib585e04e890cf73bd254d3ba4e7ac3cf01cd342c
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 56cc6a8..3721076 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -108,6 +108,10 @@
   commands.
   ``state_dir=/var/lib/zuul``
 
+**jobroot_dir**
+  Path to directory that Zuul should store temporary job files.
+  ``jobroot_dir=/tmp``
+
 **report_times**
   Boolean value (``true`` or ``false``) that determines if Zuul should
   include elapsed times for each job in the textual report.  Used by
diff --git a/zuul/cmd/executor.py b/zuul/cmd/executor.py
index 1893f5a..4f5b61c 100755
--- a/zuul/cmd/executor.py
+++ b/zuul/cmd/executor.py
@@ -79,8 +79,14 @@
 
         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
         self.executor = ExecutorServer(self.config, self.connections,
+                                       jobdir_root=jobroot_dir,
                                        keep_jobdir=self.args.keep_jobdir)
         self.executor.start()