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
# [howto/manual]).
latex_documents = [
('index', 'Cinder.tex', u'Cinder Documentation',
('index', 'cinder.tex', u'Cinder Documentation',
u'Cinder Contributors', 'manual'),
]
@ -247,3 +247,15 @@ latex_documents = [
# If false, no module index is generated.
# 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
``cinder.conf`` file are set to default values.
.. only:: html
The sample configuration file can also be viewed in
`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,6 +31,8 @@ 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
different policy for an operation that is not the default.
.. only:: html
The sample policy file can also be viewed in `file form
<../../../_static/cinder.policy.yaml.sample>`_.

View File

@ -82,6 +82,8 @@ Other Resources
Module Reference <api/modules>
.. only:: html
Indices and tables
------------------

View File

@ -161,6 +161,9 @@ Contents:
common/glossary.rst
.. only:: html
Indices and tables
~~~~~~~~~~~~~~~~~~

15
tox.ini
View File

@ -136,10 +136,23 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
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
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]
basepython = python3
sitepackages = False