tox: Stop build *all* docs in 'docs'

The 'docs' target currently builds the documentation trees in 'api-ref',
'api-guide' and 'placement-api-ref', in addition to 'doc'. This
massively increases the amount of time docs take to build both locally
and in the gate. It's not necessary for gate, since separate jobs take
care of the other documents for us [1]. As such, we should stop doing
it. For users that *do* care about this (for whatever reason) a new
'all-docs' target is included.

[1] https://github.com/openstack-infra/project-config/blob/master/zuul.d/projects.yaml#L5578-L5595

Change-Id: I58bd50e869fc00dde5dd388efb686a7196c8db80
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
(cherry picked from commit f49b81fa2b)
This commit is contained in:
Stephen Finucane 2018-10-26 17:53:03 +01:00
parent 3b1f1e356f
commit 76b4997c42
1 changed files with 13 additions and 4 deletions

17
tox.ini
View File

@ -168,7 +168,7 @@ commands =
[testenv:docs]
description =
Build all documentation including API guides and refs.
Build main documentation.
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
@ -179,9 +179,6 @@ commands =
sphinx-build -W -b html doc/source doc/build/html
# Test the redirects. This must run after the main docs build
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
{[testenv:api-guide]commands}
{[testenv:api-ref]commands}
{[testenv:placement-api-ref]commands}
[testenv:api-guide]
description =
@ -219,6 +216,18 @@ commands =
rm -rf releasenotes/build
sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html
[testenv:all-docs]
description =
Build all documentation including API guides and refs.
envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt
commands =
{[testenv:docs]commands}
{[testenv:api-guide]commands}
{[testenv:api-ref]commands}
{[testenv:placement-api-ref]commands}
{[testenv:releasenotes]commands}
[testenv:bandit]
# NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove.