022832a1d7
Create a parameter called tox_upper_constraints. The parameter points to a file on the system. If the file exists, it will be passed to the tox invocation in the UPPER_CONSTRAINTS_FILE environment variable. This allows a global setting in a base job of a known file to be the UPPER_CONSTRAINTS_FILE file, or for that to be overridden on a per-job basis. For people who do not know or care what an UPPER_CONSTRAINTS_FILE file is, the behavior should be a no-op. Also, collapse tox_environment and tox_environment_defaults. zuul already does variable merging on parent and child jobs, so we don't need to do it in the playbook. While we're in there, clean up a few small things in the yaml. Notably, jlk says we should not put variables in task names, and we don't need quotes around strings if they don't have special characters. Change-Id: Ibede59ca6f85914952da175c77ea29391ef9a88c
153 lines
3.6 KiB
YAML
153 lines
3.6 KiB
YAML
# Shared jobs that are generally applicable to everyone
|
|
# Assumes a 'base' job defined elsewhere
|
|
|
|
- job:
|
|
name: unittests
|
|
description: |
|
|
Perform setup common to all unit test jobs.
|
|
|
|
This performs basic host and general project setup tasks common
|
|
to all types of unit test jobs.
|
|
pre-run: playbooks/unittests/pre
|
|
post-run: playbooks/unittests/post
|
|
|
|
- job:
|
|
name: tox
|
|
parent: unittests
|
|
description: |
|
|
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:
|
|
|
|
.. zuul:jobvar:: tox_envlist
|
|
|
|
Use the specified tox environments (``ALL`` selects all).
|
|
|
|
.. zuul:jobvar:: tox_environment
|
|
|
|
List of user defined environmental variables to pass to bash
|
|
shell.
|
|
|
|
.. zuul:jobvar:: tox_extra_args
|
|
|
|
String containing extra arguments to append to the tox command line.
|
|
|
|
.. zuul:jobvar: tox_upper_constraints_file
|
|
|
|
Path to an upper constraints file. Will be provided to tox via
|
|
UPPER_CONSTRAINTS_FILE environment variable if it exists.
|
|
run: playbooks/tox/run
|
|
pre-run: playbooks/tox/pre
|
|
post-run: playbooks/tox/post
|
|
vars:
|
|
tox_environment:
|
|
NOSE_WITH_HTML_OUTPUT: 1
|
|
NOSE_HTML_OUT_FILE: nose_results.html
|
|
NOSE_WITH_XUNIT: 1
|
|
|
|
- job:
|
|
name: tox-py27
|
|
parent: tox
|
|
description: |
|
|
Run unit tests for a Python project under cPython version 2.7.
|
|
|
|
Uses tox with the ``py27`` environment.
|
|
vars:
|
|
tox_envlist: py27
|
|
|
|
- job:
|
|
name: tox-py34
|
|
parent: tox
|
|
description: |
|
|
Run unit tests for a Python project under cPython version 3.4.
|
|
|
|
Uses tox with the ``py34`` environment.
|
|
vars:
|
|
tox_envlist: py34
|
|
|
|
- job:
|
|
name: tox-py35
|
|
parent: tox
|
|
description: |
|
|
Run unit tests for a Python project under cPython version 3.5.
|
|
|
|
Uses tox with the ``py35`` environment.
|
|
vars:
|
|
tox_envlist: py35
|
|
|
|
- job:
|
|
name: tox-docs
|
|
parent: tox
|
|
description: |
|
|
Run documentation unit tests.
|
|
|
|
Uses tox with the ``docs`` environment.
|
|
vars:
|
|
tox_envlist: docs
|
|
post-run: playbooks/tox/docs-post
|
|
success-url: html/
|
|
|
|
- job:
|
|
name: tox-linters
|
|
parent: tox
|
|
description: |
|
|
Runs code linting tests.
|
|
|
|
Uses tox with the ``linters`` environment.
|
|
vars:
|
|
tox_envlist: linters
|
|
|
|
- job:
|
|
name: tox-pep8
|
|
parent: tox
|
|
description: |
|
|
Runs code pep8 tests.
|
|
|
|
Uses tox with the ``pep8`` environment.
|
|
vars:
|
|
tox_envlist: pep8
|
|
|
|
- job:
|
|
name: tox-cover
|
|
parent: tox
|
|
description: |
|
|
Run code coverage tests.
|
|
|
|
Uses tox with the ``cover`` environment.
|
|
vars:
|
|
tox_envlist: cover
|
|
|
|
- job:
|
|
name: python-sdist
|
|
description: |
|
|
Build a source tarball and wheel for uploading
|
|
run: playbooks/python/sdist.yaml
|
|
post-run: playbooks/python/tarball-post
|
|
|
|
- job:
|
|
name: python-upload-pypi
|
|
parent: python-sdist
|
|
description: |
|
|
Generate a 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.
|
|
post-run: playbooks/python/upload-pypi
|
|
|
|
- job:
|
|
name: trigger-readthedocs
|
|
description:
|
|
Send a trigger to the readthedocs url to tell it to build docs
|
|
nodes: []
|
|
run: playbooks/python/readthedocs
|
|
|
|
- job:
|
|
name: multinode
|
|
description: |
|
|
Do additional setup needed for multi-node jobs such as setting up
|
|
overlay networks and setting up known-hosts and ssh keys
|
|
pre-run: playbooks/multinode/pre
|