training-guides/tox.ini
Matjaz Pancur 578b53962b Publish training-guides slides as draft
Update publishdocs target so that the training-guides
slides will be published at
http://docs.openstack.org/draft/training-guides

Change-Id: I7418dbbc5935b86d49fd5917041d7e4e2af2d3cf
2015-09-08 10:01:54 +02:00

95 lines
3.3 KiB
INI

[tox]
minversion = 1.6
envlist = slides
skipsdist = True
[testenv]
basepython = python2
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
bash
cp
mkdir
rm
sed
[testenv:venv]
commands = {posargs}
[testenv:slides]
# New RST based environment for building slides
# Note: Resulting files will not be made available anywhere.
commands =
# Niceness test for doc directory
doc8 doc
# Build labs tar/zip files
mkdir -p publish-docs/trunk/training-guides
# Build training labs scripts
bash {toxinidir}/tools/generatelabs
bash {toxinidir}/tools/generateslides
[testenv:bashate]
deps = bashate
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs
-not \( -type d -name doc -prune \) \ # skip docs dir
-type f \ # only files
-not -name \*~ \ # skip editors, readme, etc
-not -name \*.md \
\( \
-name \*.sh -or \
-name \*rc -or \
-name functions\* -or \
-wholename \*/inc/\* -or \ # /inc files and
-wholename \*/lib/\* \ # /lib files are shell, but
\) \ # have no extension
-print0 | xargs -0 bashate -v"
[doc8]
# Settings for doc8:
# File extensions to use
extension = .rst,.txt
ignore-path = doc/upstream-training/build/*,doc/training-guides/*/build/*
[testenv:checkbuild]
commands =
# Niceness test
doc8 doc/upstream-training
doc8 doc/training-guides
# Build upstream-training slides
sphinx-build -b slides doc/upstream-training/source/ doc/upstream-training/build/slides
sphinx-build -b slides doc/training-guides/associate-guide/ doc/training-guides/associate-guide/build/slides
mkdir -p publish-docs/draft/upstream-training
mkdir -p publish-docs/draft/training-guides
rsync -av doc/upstream-training/build/slides/ publish-docs/draft/upstream-training/
rsync -av doc/training-guides/associate-guide/build/slides/ publish-docs/draft/training-guides/
[testenv:publishdocs]
commands =
# Build upstream-training slides
sphinx-build -b slides doc/upstream-training/source/ doc/upstream-training/build/slides
mkdir -p publish-docs/draft/upstream-training
rsync -av doc/upstream-training/build/slides/ publish-docs/draft/upstream-training/
# Build training-slides
sphinx-build -b slides doc/training-guides/associate-guide/ doc/training-guides/associate-guide/build/slides
mkdir -p publish-docs/draft/training-guides
rsync -av doc/training-guides/associate-guide/build/slides/ publish-docs/draft/training-guides/
[testenv:upstream-slides]
commands =
# Niceness test
doc8 doc/upstream-training
# Build upstream-training slides
sphinx-build -b slides doc/upstream-training/source/ doc/upstream-training/build/slides
[testenv:training-slides]
commands =
# Niceness test
doc8 doc/training-guides
# Build upstream-training slides
sphinx-build -b slides doc/training-guides/associate-guide/ doc/training-guides/associate-guide/build/slides