
Switch our docs job to use opendev-tox-docs job as base so that we can publish later the content from gate directly (via promote queue) and do not need to rebuild in post again. Use the new promote-openstack-manuals job as first step in using promote publishing. The other publish jobs will be replaced separately. Use for building now publishdocs/publishlang so that we have exactly the same content in check and gate - and in the published website. For this, update tox.ini and publish script. Also, do not publish project-data. Depends-On: https://review.opendev.org/676489 Change-Id: I91f22173a4a6ed421f339833c486a31fd319dba3
124 lines
3.4 KiB
INI
124 lines
3.4 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = linters,checkbuild
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython=python3
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
passenv = ZUUL_*
|
|
whitelist_externals =
|
|
bash
|
|
cp
|
|
mkdir
|
|
rm
|
|
rsync
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:linkcheck]
|
|
commands =
|
|
{toxinidir}/tools/build-all-rst.sh --linkcheck
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
flake8
|
|
doc8 doc
|
|
{toxinidir}/tools/glossary-sort.sh
|
|
|
|
[testenv:checkbuild]
|
|
commands =
|
|
{toxinidir}/tools/publishdocs.sh build
|
|
whereto publish-docs/html/www/.htaccess publish-docs/html/www/redirect-tests.txt
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
{toxinidir}/tools/build-all-rst.sh
|
|
|
|
[testenv:pdfs]
|
|
commands =
|
|
{toxinidir}/tools/build-all-rst.sh --pdf
|
|
|
|
[testenv:build]
|
|
commands =
|
|
{toxinidir}/tools/build-rst.sh \
|
|
doc/{posargs} \
|
|
--build build \
|
|
--target {posargs}
|
|
|
|
[testenv:publishdocs]
|
|
# Prepare all documents (except www subdir) so that they can get
|
|
# published on docs.openstack.org with just copying publish-docs/*
|
|
# over.
|
|
commands =
|
|
{toxinidir}/tools/publishdocs.sh publish
|
|
whereto publish-docs/html/.htaccess publish-docs/html/redirect-tests.txt
|
|
rm publish-docs/html/redirect-tests.txt
|
|
|
|
[testenv:checklang]
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands =
|
|
doc-tools-check-languages doc-tools-check-languages.conf test all
|
|
# Move from publish-docs to publish-docs/html
|
|
# TODO(AJaeger): Remove once openstack-doc-tools is updated
|
|
mkdir publish-docs-new
|
|
mv publish-docs publish-docs-new/html
|
|
mv publish-docs-new publish-docs
|
|
|
|
[testenv:buildlang]
|
|
# Run as "tox -e buildlang -- $LANG"
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands =
|
|
doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
|
|
|
[testenv:publishlang]
|
|
whitelist_externals = doc-tools-check-languages
|
|
commands =
|
|
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
|
# Move from publish-docs to publish-docs/html
|
|
# TODO(AJaeger): Remove once openstack-doc-tools is updated
|
|
mkdir publish-docs-new
|
|
mv publish-docs publish-docs-new/html
|
|
mv publish-docs-new publish-docs
|
|
|
|
[testenv:generatepot-rst]
|
|
# Generate POT files for translation, needs {posargs} like:
|
|
# tox -e generatepot-rst -- user-guide
|
|
commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
# Ignore target directories and autogenerated files
|
|
ignore-path = doc/*/target,doc/*/build*
|
|
# File extensions to use
|
|
extensions = .rst,.txt
|
|
# Maximal line length should be 79 but we have some overlong lines.
|
|
# Let's not get far more in.
|
|
max-line-length = 79
|
|
# Disable some doc8 checks:
|
|
# D000: Check RST validity (cannot handle the "linenos" directive)
|
|
ignore = D000
|
|
|
|
[flake8]
|
|
show-source = True
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,*/source/conf.py
|