zuul-jobs/roles/build-container-image/common.rst

4.7 KiB

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

  • :zuulbuild-container-image: Build the images.

Note

Build and upload roles are forthcoming.

The :zuulbuild-container-image role is designed to be used in check and gate pipelines and simply builds the images. It can be used to verify that the build functions, or it can be followed by the use of subsequent roles to upload the images to a registry.

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.

Use the :zuulensure-docker or :zuulinstall-podman role to install Docker or Podman before using these roles.

Role Variables

The default container filename name to use. Serves as the base for :zuulbuild-container-image.container_images.container_filename. This allows a global overriding of the container filename name, for example when building all images from different folders with similarily named containerfiles.

If omitted, the default depends on the container command used. Typically, this is Dockerfile for docker and Containerfile (with a fallback on Dockerfile) for podman.