Update fetch sphinx output to use sphinx vars

The sphinx roles takes source and build parameters. Update
fetch-sphinx-output to also honor them so that a job can set them and
have both build and fetch honor them.

Change-Id: Ic9fc6648a25336b968e8727bb8f4fd4cfd1548bb
This commit is contained in:
Monty Taylor 2017-11-20 10:25:15 -06:00
parent fc4bbd8f07
commit b034c85ab1
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 14 additions and 2 deletions

View File

@ -11,9 +11,19 @@ to the log root of the executor.
The destination directory on the executor. By default, the log The destination directory on the executor. By default, the log
root. root.
.. zuul:rolevar:: sphinx_build_dir
:default: doc/build
Directory relative to zuul_work_dir where build output will be put.
.. zuul:rolevar:: sphinx_output_src .. zuul:rolevar:: sphinx_output_src
:default: src/{{ zuul.project.canonical_name }}/doc/build/html :default: {{ zuul_work_dir }}/{{ sphinx_build_dir }}/html
The location on the worker from which to fetch the generated sphinx The location on the worker from which to fetch the generated sphinx
content. By default, the HTML doc build dir of the current content. By default, the HTML doc build dir of the current
project. project.
.. zuul:rolevar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
The location of the main working directory of the job.

View File

@ -1,3 +1,5 @@
--- ---
zuul_executor_dest: "{{ zuul.executor.log_root }}" zuul_executor_dest: "{{ zuul.executor.log_root }}"
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html" zuul_work_dir: "{{ zuul.project.src_dir }}"
sphinx_build_dir: doc/build
sphinx_output_src: "{{ zuul_work_dir }}/{{ sphinx_build_dir }}/html"