Merge "Add pdf documentation build in tox"

This commit is contained in:
Zuul 2019-09-03 18:44:08 +00:00 committed by Gerrit Code Review
commit 749ac2d220
6 changed files with 57 additions and 18 deletions

View File

@ -227,7 +227,7 @@ htmlhelp_basename = 'cinderdoc'
# (source start file, target name, title, author, documentclass # (source start file, target name, title, author, documentclass
# [howto/manual]). # [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'Cinder.tex', u'Cinder Documentation', ('index', 'cinder.tex', u'Cinder Documentation',
u'Cinder Contributors', 'manual'), u'Cinder Contributors', 'manual'),
] ]
@ -247,3 +247,15 @@ latex_documents = [
# If false, no module index is generated. # If false, no module index is generated.
# latex_use_modindex = True # latex_use_modindex = True
# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
latex_use_xindy = False
latex_domain_indices = False
latex_elements = {
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
'maxlistdepth': 10,
}

View File

@ -6,8 +6,15 @@ The ``cinder.conf`` file is installed in ``/etc/cinder`` by default.
When you manually install the Block Storage service, the options in the When you manually install the Block Storage service, the options in the
``cinder.conf`` file are set to default values. ``cinder.conf`` file are set to default values.
The sample configuration file can also be viewed in .. only:: html
`file form <../../../_static/cinder.conf.sample>`_.
.. literalinclude:: ../../../_static/cinder.conf.sample The sample configuration file can also be viewed in
:language: ini `file form <../../../_static/cinder.conf.sample>`_.
.. literalinclude:: ../../../_static/cinder.conf.sample
:language: ini
.. only:: latex
See the on-line version of this documentation for the full example
config file.

View File

@ -31,7 +31,9 @@ The following provides a listing of the default policies. It is not recommended
to copy this file into ``/etc/cinder`` unless you are planning on providing a to copy this file into ``/etc/cinder`` unless you are planning on providing a
different policy for an operation that is not the default. different policy for an operation that is not the default.
The sample policy file can also be viewed in `file form .. only:: html
<../../../_static/cinder.policy.yaml.sample>`_.
The sample policy file can also be viewed in `file form
<../../../_static/cinder.policy.yaml.sample>`_.
.. literalinclude:: ../../../_static/cinder.policy.yaml.sample .. literalinclude:: ../../../_static/cinder.policy.yaml.sample

View File

@ -82,10 +82,12 @@ Other Resources
Module Reference <api/modules> Module Reference <api/modules>
Indices and tables .. only:: html
------------------
* :ref:`genindex` Indices and tables
* :ref:`modindex` ------------------
* :ref:`search`
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -161,10 +161,13 @@ Contents:
common/glossary.rst common/glossary.rst
Indices and tables
~~~~~~~~~~~~~~~~~~
Contents: .. only:: html
* :ref:`genindex` Indices and tables
* :ref:`search` ~~~~~~~~~~~~~~~~~~
Contents:
* :ref:`genindex`
* :ref:`search`

15
tox.ini
View File

@ -136,10 +136,23 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = commands =
rm -fr doc/build doc/source/contributor/api/ .autogenerated rm -fr doc/source/contributor/api/
rm -fr doc/build/html doc/build/doctrees
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
whitelist_externals = rm whitelist_externals = rm
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
commands =
rm -fr doc/source/contributor/api/
rm -fr doc/build/pdf
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
whitelist_externals =
make
rm
[testenv:gendriverlist] [testenv:gendriverlist]
basepython = python3 basepython = python3
sitepackages = False sitepackages = False