zuul-jobs/zuul.yaml
Monty Taylor b493ca62dd
Add general sphinx and reno jobs and role
Sphinx jobs and reno jobs need basically the same thing for
dependencies. So make a new role, ensure-sphinx, which is
parameterizable enough that it can be used by both reno and sphinx jobs.

Make build jobs for both releasenotes and sphinx docs, as both of these
things are perfectly valid things to do in both OpenStack and
non-OpenStack contexts. We'll add an openstack specific job in
openstack-zuul-jobs that uses these as parents but adds the requirements
repo and constraints file settings.

Some of the pip commands here can be improved once
https://github.com/ansible/ansible/pull/33098 lands and is released,
which would allow specifying --user and -c as parameters to the pip
module.

Change-Id: Idd7caf7d88b56d61872906027b4ce7d743572ded
Needed-By: I57de14580f39b9e1c11a587b51b44b61b02c84da
2017-11-20 17:59:28 -06:00

315 lines
7.8 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.yaml
post-run: playbooks/unittests/post.yaml
- 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_constraints_file
Path to a pip constraints file. Will be provided to tox in the
UPPER_CONSTRAINTS_FILE environment variable if it exists.
.. zuul:jobvar: tox_install_siblings
:default: true
Override tox requirements that have corresponding zuul git repos
on the node by installing the git versions into the tox virtualenv.
run: playbooks/tox/run.yaml
pre-run: playbooks/tox/pre.yaml
post-run: playbooks/tox/post.yaml
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.yaml
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.
post-run: playbooks/tox/cover-post.yaml
vars:
tox_envlist: cover
- job:
name: tox-bashate
parent: tox
description: |
Run bashate tests.
Uses tox with the ``bashate`` environment.
vars:
tox_envlist: bashate
- job:
name: python-sdist
description: |
Build a source tarball and wheel for uploading
run: playbooks/python/sdist.yaml
post-run: playbooks/python/tarball-post.yaml
- 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.yaml
- job:
name: build-sphinx-docs
description: |
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:
.. zuul:jobvar:: constraints_file
Optional path to a pip constraints file for installing python
libraries.
.. zuul:jobvar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Directory to operate in.
pre-run: playbooks/sphinx/pre.yaml
run: playbooks/sphinx/run.yaml
post-run: playbooks/sphinx/post.yaml
- job:
name: build-reno-releasenotes
description: |
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:
.. zuul:jobvar:: constraints_file
Optional path to a pip constraints file for installing python
libraries.
.. zuul:jobvar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Directory to operate in.
success-url: html/
# Release notes always build on master.
override-checkout: master
pre-run: playbooks/releasenotes/pre.yaml
run: playbooks/releasenotes/run.yaml
post-run: playbooks/releasenotes/post.yaml
files:
- ^releasenotes/.*
- bindep.txt
- doc/requirements.txt
- test-requirements.txt
- job:
name: trigger-readthedocs
description: Send a trigger to the readthedocs url to tell it to build docs
nodeset:
nodes: []
run: playbooks/python/readthedocs.yaml
- 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.yaml
- job:
name: javascript-base
description: |
Base job for javascript operations
Responds to these variables:
.. zuul:jobvar:: node_version
:default: 6
The version of Node to use.
.. zuul:jobvar: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Path to operate in.
pre-run: playbooks/javascript/pre.yaml
post-run: playbooks/javascript/post.yaml
- job:
name: build-javascript-tarball
parent: javascript-base
description: |
Build a source tarball for a Javascript project
Responds to these variables:
.. zuul:jobvar:: node_version
:default: 6
The version of Node to use.
.. zuul:jobvar: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Path to operate in.
run: playbooks/javascript/tarball.yaml
- job:
name: nodejs-npm-run-test
parent: javascript-base
description: |
Run test using nodejs.
Responds to this variable:
.. zuul:jobvar:: node_version
:default: 6
The version of Node to use.
run: playbooks/javascript/run-test.yaml
- job:
name: nodejs-npm-run-lint
parent: javascript-base
description: |
Run lint using nodejs.
Responds to this variable:
.. zuul:jobvar:: node_version
:default: 6
The version of Node to use.
run: playbooks/javascript/run-lint.yaml
- job:
name: nodejs-npm-run-docs
parent: javascript-base
description: |
Run docs using nodejs.
Responds to this variable:
.. zuul:jobvar:: node_version
:default: 6
The version of Node to use.
run: playbooks/javascript/run-docs.yaml
post-run: playbooks/tox/docs-post.yaml
success-url: html/