From 3fc688b08dbe2ff41a75f051f53b4929dd35800f Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 25 Apr 2023 15:27:41 -0700 Subject: [PATCH] Run ensure-quay-repo in our base container jobs 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 --- playbooks/container-image/pre-quay.yaml | 6 ++++++ zuul.d/jobs.yaml | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 playbooks/container-image/pre-quay.yaml diff --git a/playbooks/container-image/pre-quay.yaml b/playbooks/container-image/pre-quay.yaml new file mode 100644 index 0000000..4a52d98 --- /dev/null +++ b/playbooks/container-image/pre-quay.yaml @@ -0,0 +1,6 @@ +- hosts: localhost + roles: + # This will create image repos in quay if the container_image + # entries and container_registry_credentials have the appropriate + # contents. + - ensure-quay-repo diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index c6a1d4a..771a592 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -259,6 +259,7 @@ .. include:: ../../playbooks/container-image/README.rst .. include:: ../../playbooks/container-image/credentials.rst + pre-run: playbooks/container-image/pre-quay.yaml post-run: playbooks/container-image/upload.yaml - job: @@ -271,6 +272,7 @@ .. include:: ../../playbooks/container-image/README.rst .. include:: ../../playbooks/container-image/credentials.rst + pre-run: playbooks/container-image/pre-quay.yaml vars: *container_vars - job: