Bake in oslo sample config generation to sphinx build
The expectation from users is that to build docs locally all you need to do is run build_sphinx on the repo and the docs will be fully created. When we added the sample config to the tempest docs we ignored this and just added the sample config generation to the docs tox job. This commit fixes this by baking in the sample config generation to the sphinx conf.py file which should ensure we have the sample config generated every time that we call build_sphinx. Change-Id: Ifd570707847f52592f5bc9bc743b8d3c98512639
This commit is contained in:
parent
c6170a0321
commit
13ed69fffc
@ -13,6 +13,19 @@
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# Build a tempest sample config file:
|
||||
def build_sample_config(app):
|
||||
root_dir = os.path.dirname(
|
||||
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
subprocess.call(["oslo-config-generator", "--config-file",
|
||||
"tools/config/config-generator.tempest.conf",
|
||||
"--output-file", "doc/source/_static/tempest.conf"],
|
||||
cwd=root_dir)
|
||||
|
||||
def setup(app):
|
||||
app.connect('builder-inited', build_sample_config)
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
1
tox.ini
1
tox.ini
@ -110,7 +110,6 @@ commands = {posargs}
|
||||
[testenv:docs]
|
||||
# The sample config file we generate is included in the sphinxdoc, so build that first.
|
||||
commands =
|
||||
oslo-config-generator --config-file tools/config/config-generator.tempest.conf --output-file doc/source/_static/tempest.conf
|
||||
python setup.py build_sphinx {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
|
Loading…
Reference in New Issue
Block a user