Change the dependency with the testenv:docs

Add the description for pep8, docs, pdf-docs, releasenotes, api-ref.
Change the pdf-docs and releasenotes's packages dependency with the
test docs requirement.

Story: 2008360

Change-Id: Ifcb28a340733b90329970be0078118d523b64bd3
This commit is contained in:
zhangbailin 2020-11-17 09:57:18 +00:00
parent 54b4fa53ad
commit 396559309b

12
tox.ini
View File

@ -88,6 +88,8 @@ ignore-path = .venv,.git,.tox,*cyborg/locale*,*lib/python*,*cyborg.egg*,api-ref/
[testenv:docs]
description =
Build main documentation.
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
@ -96,6 +98,8 @@ commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
description =
Build PDF documentation.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
@ -104,6 +108,9 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
description =
Generate release notes.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -111,9 +118,12 @@ commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasen
commands = oslo_debug_helper -t cyborg/tests {posargs}
[testenv:api-ref]
description =
Generate the API ref. Called from CI scripts to test and publish to docs.openstack.org.
# This environment is called from CI scripts to test and publish
# the API Ref to docs.openstack.org.
deps = -r{toxinidir}/doc/requirements.txt
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html