Jobs

run-test-command

Run simple command as test.

To use this, set the test_command variable.

nodejs-npm-run-docs

Run docs using nodejs.

Responds to these variables:

node_version
Default: 6

The version of Node to use.

nodejs-npm-run-lint

Run lint using nodejs.

Responds to these variables:

node_version
Default: 6

The version of Node to use.

nodejs-npm-run-test

Run test using nodejs. This test also starts Xvfb for run time tests.

Responds to these variables:

node_version
:default: 6

The version of Node to use.

build-javascript-content

Build javascript web content as it should be deployed.

Responds to these variables:

npm_command
Default: build

Command to pass to npm.

node_version
Default: 6

The version of Node to use.

build-javascript-tarball

Build a source tarball for a Javascript project

Responds to these variables:

node_version
Default: 6

The version of Node to use.

nodejs-npm

Base job for javascript operations

Responds to these variables:

npm_command
Default: build

Command to pass to npm.

node_version
Default: 6

The version of Node to use.

multinode

Do additional setup needed for multi-node jobs such as setting up overlay networks and setting up known-hosts and ssh keys

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.

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.

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-python-release

Build a source tarball and a bdist wheel for uploading.

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.

tox-bashate

Run bashate tests.

Uses tox with the bashate environment.

tox-cover

Run code coverage tests.

Uses tox with the cover environment.

tox-pep8

Runs code pep8 tests.

Uses tox with the pep8 environment.

tox-linters

Runs code linting tests.

Uses tox with the linters environment.

tox-docs

Run documentation unit tests.

Uses tox with the docs environment.

tox-py36

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

Uses tox with the py36 environment.

tox-py35

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

Uses tox with the py35 environment.

tox-py34

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

Uses tox with the py34 environment.

tox-py27

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

Uses tox with the py27 environment.

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.

promote-docker-image

Retag a previously-uploaded docker image.

This is one of a collection of jobs which are designed to work together to build, upload, and promote docker images in a gating context:

The build-docker-image job is designed to be used in a check pipeline and simply builds the images to verify that the build functions.

The upload-docker-image job builds and uploads the images to Docker Hub, but only with a single tag corresponding to the change ID. This job is designed in a gate pipeline so that the build produced by the gate is staged and can later be promoted to production if the change is successful.

The promote-docker-image job is designed to be used in a promote pipeline. It requires no nodes and runs very quickly on the Zuul executor. It simply re-tags a previously uploaded image for a change with whatever tags are supplied by build-docker-image.docker_images.tags. It also removes the change ID tag from the repository in Docker Hub, and removes any similar change ID tags more than 24 hours old. This keeps the repository tidy in the case that gated changes fail to merge after uploading their staged images.

They all accept the same input data, principally a list of dictionaries representing the images to build. YAML anchors can be used to supply the same data to all three jobs.

Job Variables

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

The project directory. Serves as the base for build-docker-image.docker_images.context.

docker_images
Type: list

A list of images to build. Each item in the list should have:

docker_images[].context

The docker build context; this should be a directory underneath build-docker-image.zuul_work_dir.

docker_images[].repository

The name of the target repository in dockerhub for the image. Supply this even if the image is not going to be uploaded (it will be tagged with this in the local registry).

docker_images[].path

Optional: the directory that should be passed to docker build. Useful for building images with a Dockerfile in the context directory but a source repository elsewhere.

docker_images[].build_args
Type: list

Optional: a list of values to pass to the docker --build-arg parameter.

docker_images[].target

Optional: the target for a multi-stage build.

docker_images[].tags
Default: ['latest']
Type: list

A list of tags to be added to the image when promoted.

docker_credentials
Type: dict

This is expected to be a Zuul Secret with these keys:

docker_credentials{}.username

The Docker Hub username.

docker_credentials{}.password

The Docker Hub password.

docker_credentials{}.repository

Optional; if supplied this is a regular expression which restricts to what repositories the image may be uploaded. The following example allows projects to upload images to repositories within an organization based on their own names:

repository: "^myorgname/{{ zuul.project.short_name }}.*"
upload-docker-image

Build and upload a docker image.

This is one of a collection of jobs which are designed to work together to build, upload, and promote docker images in a gating context:

The build-docker-image job is designed to be used in a check pipeline and simply builds the images to verify that the build functions.

The upload-docker-image job builds and uploads the images to Docker Hub, but only with a single tag corresponding to the change ID. This job is designed in a gate pipeline so that the build produced by the gate is staged and can later be promoted to production if the change is successful.

The promote-docker-image job is designed to be used in a promote pipeline. It requires no nodes and runs very quickly on the Zuul executor. It simply re-tags a previously uploaded image for a change with whatever tags are supplied by build-docker-image.docker_images.tags. It also removes the change ID tag from the repository in Docker Hub, and removes any similar change ID tags more than 24 hours old. This keeps the repository tidy in the case that gated changes fail to merge after uploading their staged images.

They all accept the same input data, principally a list of dictionaries representing the images to build. YAML anchors can be used to supply the same data to all three jobs.

Job Variables

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

The project directory. Serves as the base for build-docker-image.docker_images.context.

docker_images
Type: list

A list of images to build. Each item in the list should have:

docker_images[].context

The docker build context; this should be a directory underneath build-docker-image.zuul_work_dir.

docker_images[].repository

The name of the target repository in dockerhub for the image. Supply this even if the image is not going to be uploaded (it will be tagged with this in the local registry).

docker_images[].path

Optional: the directory that should be passed to docker build. Useful for building images with a Dockerfile in the context directory but a source repository elsewhere.

docker_images[].build_args
Type: list

Optional: a list of values to pass to the docker --build-arg parameter.

docker_images[].target

Optional: the target for a multi-stage build.

docker_images[].tags
Default: ['latest']
Type: list

A list of tags to be added to the image when promoted.

docker_credentials
Type: dict

This is expected to be a Zuul Secret with these keys:

docker_credentials{}.username

The Docker Hub username.

docker_credentials{}.password

The Docker Hub password.

docker_credentials{}.repository

Optional; if supplied this is a regular expression which restricts to what repositories the image may be uploaded. The following example allows projects to upload images to repositories within an organization based on their own names:

repository: "^myorgname/{{ zuul.project.short_name }}.*"
build-docker-image

Build a docker image.

This is one of a collection of jobs which are designed to work together to build, upload, and promote docker images in a gating context:

The build-docker-image job is designed to be used in a check pipeline and simply builds the images to verify that the build functions.

The upload-docker-image job builds and uploads the images to Docker Hub, but only with a single tag corresponding to the change ID. This job is designed in a gate pipeline so that the build produced by the gate is staged and can later be promoted to production if the change is successful.

The promote-docker-image job is designed to be used in a promote pipeline. It requires no nodes and runs very quickly on the Zuul executor. It simply re-tags a previously uploaded image for a change with whatever tags are supplied by build-docker-image.docker_images.tags. It also removes the change ID tag from the repository in Docker Hub, and removes any similar change ID tags more than 24 hours old. This keeps the repository tidy in the case that gated changes fail to merge after uploading their staged images.

They all accept the same input data, principally a list of dictionaries representing the images to build. YAML anchors can be used to supply the same data to all three jobs.

Job Variables

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

The project directory. Serves as the base for build-docker-image.docker_images.context.

docker_images
Type: list

A list of images to build. Each item in the list should have:

docker_images[].context

The docker build context; this should be a directory underneath build-docker-image.zuul_work_dir.

docker_images[].repository

The name of the target repository in dockerhub for the image. Supply this even if the image is not going to be uploaded (it will be tagged with this in the local registry).

docker_images[].path

Optional: the directory that should be passed to docker build. Useful for building images with a Dockerfile in the context directory but a source repository elsewhere.

docker_images[].build_args
Type: list

Optional: a list of values to pass to the docker --build-arg parameter.

docker_images[].target

Optional: the target for a multi-stage build.

docker_images[].tags
Default: ['latest']
Type: list

A list of tags to be added to the image when promoted.

unittests

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.

dco-license

A job to validate all new commits have been signed using –signoff.