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

Andreas Jaeger aj at suse.com
Tue Dec 31 17:00:05 UTC 2013


On 12/31/2013 03:49 PM, Jeremy Stanley wrote:
> 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."

It should according to my limited testing ;)

>> 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.

thanks for the tip, this works fine for me.

Patches for operations-guide (https://review.openstack.org/#/c/64561/ )
and jenkins (https://review.openstack.org/#/c/64567/) to have a first
gate setup using this method have been sent.

Once the package is on PyPI and the two patches are approved and
everything is working fine, I'll add further gates.

thanks again - and a Happy New Year!
Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the OpenStack-Infra mailing list