From eeee9fddd2b8b76d120bcd70860a6ce78fbc8755 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 5 Nov 2018 09:33:56 +0100 Subject: [PATCH] switch documentation job to new PTI Update .zuul.yaml to use PTI job, update tox.ini to use the common way to run sphinx, update setup.cfg for handling warnings as errors. Add new docs target to tox.ini and make it default target, the target is needed by CI scripts. Note that ossa does not work with python3, so the docs environment does not use basepython. This needs a rework of doc/source/_exts/vmt.py. Change-Id: I7196aab97167d857f0afdfe005d74c7f0f8f1073 --- .zuul.yaml | 2 +- setup.cfg | 1 + tox.ini | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 561ce4e..a905cc0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,6 @@ - project: templates: - - build-openstack-sphinx-docs + - build-openstack-docs-pti post: jobs: - publish-security diff --git a/setup.cfg b/setup.cfg index 68d1197..70486b3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,6 +12,7 @@ home-page = http://www.openstack.org/ all_files = 1 build-dir = doc/build source-dir = doc/source +warning-is-error = 1 [pbr] warnerrors = True diff --git a/tox.ini b/tox.ini index 8de93d4..3800903 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = venv +envlist = docs minversion = 1.6 skipsdist = True @@ -8,7 +8,13 @@ usedevelop = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} +[testenv:docs] +# The repo does not work with python3 yet, so no basepypthon set +# to python3. +deps = -r{toxinidir}/test-requirements.txt +commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html + [testenv:venv] basepython = python3 deps = -r{toxinidir}/test-requirements.txt -commands =python setup.py build_sphinx +commands = {[testenv:docs]commands}