Add singlehtml output (r8, r7. r6, r5)

Add a tox job to output docs as a single HTML page. This is mostly
for use by writers who need to reliably search globally for
content when making updates. Can be printed to PDF using browser
Print
Abstract pre and post phases for reuse in multiple builds.

Signed-off-by: Ron Stone <ronald.stone@windriver.com>
Change-Id: Ic03c82ac91a69f242c1b192e10fb19ef30846e2f
This commit is contained in:
Ron Stone 2023-09-12 14:31:02 +00:00
parent 74480497b3
commit 6191b0f544
1 changed files with 24 additions and 5 deletions

29
tox.ini
View File

@ -11,10 +11,7 @@ setenv = VIRTUAL_ENV={envdir}
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
[testenv:docs]
deps =
# -c{env:TOX_CONSTRAINTS_FILE:doc/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
[testenv:prebuild-docs]
commands =
git clean -dfx doc/source/fault-mgmt/
bash ./dirtyCheck.sh
@ -24,12 +21,22 @@ commands =
python parser.py -l templates/alarms_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Alarm -outputPath doc/source/fault-mgmt/openstack/ -sort Yes -product openstack -replace "|,OR"
python parser.py -l templates/logs_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Log -outputPath doc/source/fault-mgmt/openstack/ -sort Yes -product openstack -replace "|,OR"
bash ./normalize-includes.sh
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b html doc/source doc/build/html {posargs}
[testenv:postbuild-docs]
commands =
git clean -dfx doc/source/fault-mgmt/
git restore doc/source/dist_cloud/kubernetes/*
bash hw-updates.sh
bash htmlChecks.sh doc/build/html
[testenv:docs]
deps =
# -c{env:TOX_CONSTRAINTS_FILE:doc/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands =
{[testenv:prebuild-docs]commands}
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b html doc/source doc/build/html {posargs}
{[testenv:postbuild-docs]commands}
# Note: The dev env for the docs team uses a version of tox that does not yet support allowlist_externals
whitelist_externals = bash
htmlChecks.sh
@ -37,6 +44,18 @@ whitelist_externals = bash
git
# hw-updates.sh
[testenv:singledoc]
deps =
# -c{env:TOX_CONSTRAINTS_FILE:doc/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands =
{[testenv:prebuild-docs]commands}
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b singlehtml doc/source doc/build/singlepage {posargs}
{[testenv:postbuild-docs]commands}
whitelist_externals = bash
htmlChecks.sh
get-remote-files.sh
git
[testenv:api-ref]
deps = {[testenv:docs]deps}