Update releasenotes/docs tox jobs

This is to update releasenotes/docs tox jobs to remove need
to defined build_sphinx in setup.cfg and to ensure that they
both clean up prior to running via appropraite rm -rf commands
and to ensure all the requirements are being installed.

Change-Id: Iadd375dbb596151cb140fae03b82a728a64364a0
This commit is contained in:
Felipe Monteiro 2018-04-24 22:30:42 +01:00
parent 1566b9541a
commit 5c078ce81c
4 changed files with 23 additions and 20 deletions

View File

@ -4,3 +4,8 @@
sphinx>=1.6.2 # BSD
sphinx_rtd_theme==0.2.4
reno>=2.5.0 # Apache-2.0
# NOTE(fmontei): The requirement below is only included because readthedocs
# depends on it to work, since it only takes in one requirements file.
oslo.config!=4.3.0,!=4.4.0,>=5.2.0 # Apache-2.0
oslo.policy>=1.33.1 # Apache-2.0

View File

@ -26,12 +26,3 @@ oslo.config.opts =
oslo.policy.policies =
deckhand = deckhand.policies:list_rules
[build_sphinx]
source-dir = docs/source
build-dir = docs/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html

View File

@ -17,7 +17,3 @@ bandit>=1.4.0 # Apache-2.0
gabbi==1.35.1
pytest-html==1.16.1
pifpaf==2.0.5
# NOTE(fmontei): The requirement below is only included because readthedocs
# depends on it to work, since it runs pip install -rtest-requirements.txt.
oslo.policy>=1.33.1 # Apache-2.0

25
tox.ini
View File

@ -67,10 +67,6 @@ whitelist_externals = bandit
commands =
bandit -r deckhand -x deckhand/tests -n 5
[testenv:releasenotes]
deps = -r{toxinidir}/docs/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/deckhand/config-generator.conf
@ -92,7 +88,22 @@ ignore = E127,E128,E129,E131,H405
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,releasenotes,docs,alembic/versions
[testenv:docs]
deps = -r{toxinidir}/docs/requirements.txt
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/docs/requirements.txt
commands =
rm -rf docs/build
python setup.py build_sphinx {posargs}
rm -rf docs/build
rm -rf releasenotes/build
sphinx-build -W -b html docs/source docs/build/html
whitelist_externals =
rm
[testenv:releasenotes]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/docs/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals =
rm