Python Jobs

tox

Base job containing setup and teardown for tox-based test jobs.

This performs basic host and general project setup tasks common to all tox unit test jobs.

Responds to these variables:

tox_envlist

Use the specified tox environments (ALL selects all).

tox_environment

List of user defined environmental variables to pass to bash shell.

tox_extra_args

String containing extra arguments to append to the tox command line.

tox-py27

Run unit tests for a Python project under cPython version 2.7.

Uses tox with the py27 environment.

tox-py34

Run unit tests for a Python project under cPython version 3.4.

Uses tox with the py34 environment.

tox-py35

Run unit tests for a Python project under cPython version 3.5.

Uses tox with the py35 environment.

tox-py36

Run unit tests for a Python project under cPython version 3.6.

Uses tox with the py36 environment.

tox-py37

Run unit tests for a Python project under cPython version 3.7.

Uses tox with the py37 environment.

tox-docs

Run documentation unit tests.

Uses tox with the docs environment.

tox-linters

Runs code linting tests.

Uses tox with the linters environment.

tox-pep8

Runs code pep8 tests.

Uses tox with the pep8 environment.

tox-cover

Run code coverage tests.

Uses tox with the cover environment.

tox-bashate

Run bashate tests.

Uses tox with the bashate environment.

tox-nodejs-npm

Run tests using tox but with the javascript toolchain installed and available as well. A combination of the tox and nodejs-npm jobs. By default will run npm before running the tox environment listed.

Responds to these variables:

tox_envlist

Use the specified tox environments (ALL selects all).

tox_environment

List of user defined environmental variables to pass to bash shell.

tox_extra_args

String containing extra arguments to append to the tox command line.

npm_command
Default: build

Command to pass to npm.

node_version
Default: 6

The version of Node to use.

build-python-release

Build a source tarball and a bdist wheel for uploading.

python-upload-pypi

Generate and upload a python source tarball and binary wheel

Requires a variable pypi_info be set which is a dict containing at least a username and password attribute.

build-sphinx-docs

Build documentation using Sphinx

Additional requirements can be provided in a project in either the file doc/requirements.txt or test-requirements.txt. (The first file found in that order will be the one used) Non-python distro requirements can be specified in bindep.txt using the doc tag.

Runs whereto https://docs.openstack.org/whereto/latest/ after the build if it is installed.

Responds to these variables:

constraints_file

Optional path to a pip constraints file for installing python libraries.

sphinx_python
Default: python2

Version of python to use, either python2 or python3.

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to operate in.

build-reno-releasenotes

Build releasenotes using reno

Additional requirements can be provided in a project in either the file doc/requirements.txt or test-requirements.txt. (The first file found in that order will be the one used) Non-python distro requirements can be specified in bindep.txt using the doc tag.

Responds to these variables:

constraints_file

Optional path to a pip constraints file for installing python libraries.

sphinx_python
Default: python2

Version of python to use, either python2 or python3.

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to operate in.