From f49b81fa2bd692583370bab569f25215073a5bc2 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 26 Oct 2018 17:53:03 +0100 Subject: [PATCH] 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 --- tox.ini | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index ef12efc2fe15..f48fc6d410c6 100644 --- a/tox.ini +++ b/tox.ini @@ -165,7 +165,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 @@ -176,9 +176,6 @@ commands = sphinx-build -W -b html -d doc/build/doctrees 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 = @@ -216,6 +213,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.