
These are the analogs of the opendev-build-docker-image jobs, using the newer container roles. Change-Id: Ifec8fd7db3b238536b396a9012bdf93d0d19547e Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/878291
4.6 KiB
This is one of a collection of jobs which are designed to work together to build, upload, and promote container images in a gating context:
- :zuul
opendev-build-container-image
: Build the images.- :zuul
opendev-upload-container-image
: Build and stage the images in a registry.- :zuul
opendev-promote-container-image
: Promote previously uploaded images.
The :zuulopendev-build-container-image
job is designed to be
used in a check pipeline and simply
builds the images to verify that the build functions.
The :zuulopendev-upload-container-image
job builds and uploads
the images to a registry, 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 :zuulopendev-promote-container-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 :zuulopendev-build-container-image.container_images.tags
.
It also removes the change ID tag from the repository in the registry.
If any changes fail to merge, this cleanup will not run and those tags
will need to be deleted manually.
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
The default container filename name to use. Serves as the base for :zuul
opendev-build-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
fordocker
andContainerfile
(with a fallback onDockerfile
) forpodman
.