3fc688b08d
This will ensure that properly defined container images are created in quay registries for us. You need to do this out of band of the docker push if you want the image repos to be public. The ensure-quay-repo role should ignore images that don't have the correct metadata making this safe for all container base jobs. Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/881521 Change-Id: Ic358f5e2f44c2a1e02140f8c848fe352214ba65a |
||
---|---|---|
.. | ||
credentials.rst | ||
pre-quay.yaml | ||
pre.yaml | ||
README.rst | ||
run.yaml | ||
upload.yaml |
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
.