[OpenStack-Infra] [Openstack-docs] How to openstack-doc-tools in gate jobs for openstack-manuals etc

Jeremy Stanley fungi at yuggoth.org
Tue Dec 31 14:49:35 UTC 2013


On 2013-12-31 14:49:35 +0100 (+0100), Andreas Jaeger wrote:
> 0) Upload openstack-doc-tools to PyPI (AI: Anne)
[...]

Which (if you're able to run 'tox -evenv python setup.py sdist' and
get a proper tarball in the dist subdirectory) should be
accomplished merely by pushing a tag for 0.1 or whatever the first
release will be numbered. The tox.ini and setup.* files in
openstack-dev/cookiecutter already include machinery for this, so if
you've mostly synchronized your project with it then it probably
"just works."

> 4) Enhance run-tox.sh
> The file run-tox.sh (from config repo as
> modules/jenkins/files/slave_scripts/run-tox.sh) does not allow passing
> of extra positional args, so either write a new one or change the
> existing one to allow passing of it.
> Which option do you prefer?
[...]

Rather than passing command-line options, this is more easily
accomplished with multiple tox environments (warning--mailercode,
adapted from cookiecutter but untested):


[tox]
minversion = 1.6
envlist = checkbuild,checkdeletions,checkniceness,checksyntax
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
   VIRTUAL_ENV={envdir}
   LANG=en_US.UTF-8
   LANGUAGE=en_US:en
   LC_ALL=C
deps = -r{toxinidir}/test-requirements.txt

[testenv:venv]
commands = {posargs}

[testenv:checkbuild]
commands = openstack-doc-test --check-build

[testenv:checkdeletions]
commands = openstack-doc-test --check-deletions

[testenv:checkniceness]
commands = openstack-doc-test --check-niceness

[testenv:checksyntax]
commands = openstack-doc-test --check-syntax


Benefits of this method are that you can manually run them
individually with 'tox -e checkbuild' or all in series with just
'tox' (no optional arguments required). This also needs no
modifications to run-tox.sh since all the job has to do is pass the
appropriate environment name.
-- 
Jeremy Stanley



More information about the OpenStack-Infra mailing list