Refactor image tags to be dynamic (#1120)

In order to simplify backporting and branching of new releases,
this patch relies on the Zuul branch when building images so
that we can easily branch out a new release and it will
automatically pick up the images.
diff --git a/images/barbican/Dockerfile b/images/barbican/Dockerfile
index 28de6ab..e7f6f44 100644
--- a/images/barbican/Dockerfile
+++ b/images/barbican/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG BARBICAN_GIT_REF=ca57ef5436e20e90cf6cd6853efe3c89a9afd986
 ADD --keep-git-dir=true https://opendev.org/openstack/barbican.git#${BARBICAN_GIT_REF} /src/barbican
 RUN git -C /src/barbican fetch --unshallow
@@ -23,5 +25,5 @@
         pykmip
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 COPY --from=build --link /var/lib/openstack /var/lib/openstack
diff --git a/images/cinder/Dockerfile b/images/cinder/Dockerfile
index 4f0fbb5..d4f68b3 100644
--- a/images/cinder/Dockerfile
+++ b/images/cinder/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG CINDER_GIT_REF=b0f0b9015b9dfa228dff98eeee5116d8eca1c3cc
 ADD --keep-git-dir=true https://opendev.org/openstack/cinder.git#${CINDER_GIT_REF} /src/cinder
 RUN git -C /src/cinder fetch --unshallow
@@ -25,7 +27,7 @@
         purestorage
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/designate/Dockerfile b/images/designate/Dockerfile
index 2f86cb6..4fc0b75 100644
--- a/images/designate/Dockerfile
+++ b/images/designate/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG DESIGNATE_GIT_REF=097ffc6df181290eba1bcd7c492b1b505bc15434
 ADD --keep-git-dir=true https://opendev.org/openstack/designate.git#${DESIGNATE_GIT_REF} /src/designate
 RUN git -C /src/designate fetch --unshallow
@@ -24,7 +26,7 @@
         /src/designate
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/glance/Dockerfile b/images/glance/Dockerfile
index f408dfc..9b77fd3 100644
--- a/images/glance/Dockerfile
+++ b/images/glance/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG GLANCE_GIT_REF=0bcd6cd71c09917c6734421374fd598d73e8d0cc
 ADD --keep-git-dir=true https://opendev.org/openstack/glance.git#${GLANCE_GIT_REF} /src/glance
 RUN git -C /src/glance fetch --unshallow
@@ -25,7 +27,7 @@
         /src/glance_store[cinder]
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/heat/Dockerfile b/images/heat/Dockerfile
index d2f088c..5a13451 100644
--- a/images/heat/Dockerfile
+++ b/images/heat/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG HEAT_GIT_REF=80eea85194825773d1b60ecc4386b2d5ba52a066
 ADD --keep-git-dir=true https://opendev.org/openstack/heat.git#${HEAT_GIT_REF} /src/heat
 RUN git -C /src/heat fetch --unshallow
@@ -22,7 +24,7 @@
         /src/heat
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/horizon/Dockerfile b/images/horizon/Dockerfile
index 2f80436..c2c63f2 100644
--- a/images/horizon/Dockerfile
+++ b/images/horizon/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG HORIZON_GIT_REF=3f1f1d46e6e47a3dbe46fb023fe69ff25d6a601b
 ADD --keep-git-dir=true https://opendev.org/openstack/horizon.git#${HORIZON_GIT_REF} /src/horizon
 RUN git -C /src/horizon fetch --unshallow
@@ -49,7 +51,7 @@
         pymemcache
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/ironic/Dockerfile b/images/ironic/Dockerfile
index 8361034..bd4c7fe 100644
--- a/images/ironic/Dockerfile
+++ b/images/ironic/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG IRONIC_GIT_REF=22aa29b864eecd00bfb7c67cc2075030da1eb1d0
 ADD --keep-git-dir=true https://opendev.org/openstack/ironic.git#${IRONIC_GIT_REF} /src/ironic
 RUN git -C /src/ironic fetch --unshallow
@@ -24,7 +26,7 @@
         sushy
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/keepalived/Dockerfile b/images/keepalived/Dockerfile
index 599a93c..55cb73a 100644
--- a/images/keepalived/Dockerfile
+++ b/images/keepalived/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/ubuntu:main
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/keystone/Dockerfile b/images/keystone/Dockerfile
index a589dca..29bd6fb 100644
--- a/images/keystone/Dockerfile
+++ b/images/keystone/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG KEYSTONE_GIT_REF=8ca73f758bb613a57815fbe4ae78e3d2afa4af49
 ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
 RUN git -C /src/keystone fetch --unshallow
@@ -23,7 +25,7 @@
         keystone-keycloak-backend==0.1.8
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/libvirtd/Dockerfile b/images/libvirtd/Dockerfile
index 5654edf..65ae2d2 100644
--- a/images/libvirtd/Dockerfile
+++ b/images/libvirtd/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-runtime:main
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-runtime:${RELEASE}
 ADD --chmod=644 https://download.ceph.com/keys/release.gpg /etc/apt/trusted.gpg.d/ceph.gpg
 COPY <<EOF /etc/apt/sources.list.d/ceph.list
 deb http://download.ceph.com/debian-reef/ jammy main
diff --git a/images/magnum/Dockerfile b/images/magnum/Dockerfile
index eca883d..6abfca0 100644
--- a/images/magnum/Dockerfile
+++ b/images/magnum/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/ubuntu:main AS helm
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
 ARG TARGETOS
 ARG TARGETARCH
 ARG HELM_VERSION=3.14.0
@@ -20,7 +22,7 @@
 RUN tar -xzf /helm.tar.gz
 RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG MAGNUM_GIT_REF=c613ea4e419edc0086116da07e93cf19206746e1
 ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
 RUN git -C /src/magnum fetch --unshallow
@@ -31,7 +33,7 @@
         magnum-cluster-api==0.16.0
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/manila/Dockerfile b/images/manila/Dockerfile
index cbf63ec..f6c5784 100644
--- a/images/manila/Dockerfile
+++ b/images/manila/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG MANILA_GIT_REF=d8987589ae88ae9b2769fbe6f26d5b6994098038
 ADD --keep-git-dir=true https://opendev.org/openstack/manila.git#${MANILA_GIT_REF} /src/manila
 RUN git -C /src/manila fetch --unshallow
@@ -22,7 +24,7 @@
         /src/manila
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/netoffload/Dockerfile b/images/netoffload/Dockerfile
index 93df492..a1a0ec2 100644
--- a/images/netoffload/Dockerfile
+++ b/images/netoffload/Dockerfile
@@ -12,13 +12,15 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+ARG RELEASE
+
 FROM golang:1.20 AS build
 ARG NETOFFLOAD_GIT_REF=94b8c0fdb0b83bd1b7e14b9a58077a047c78a800
 ADD https://github.com/vexxhost/netoffload.git#${NETOFFLOAD_GIT_REF} /src
 WORKDIR /src
 RUN go build -v -o offloadctl ./cmd/offloadctl/main.go
 
-FROM registry.atmosphere.dev/library/ubuntu:main
+FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/neutron/Dockerfile b/images/neutron/Dockerfile
index 716aa1d..d10ac94 100644
--- a/images/neutron/Dockerfile
+++ b/images/neutron/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG NEUTRON_GIT_REF=019294c71d94b788c14b23dc1da3c21f51bcdb0b
 ADD --keep-git-dir=true https://opendev.org/openstack/neutron.git#${NEUTRON_GIT_REF} /src/neutron
 RUN git -C /src/neutron fetch --unshallow
@@ -25,7 +27,7 @@
         /src/neutron-vpnaas
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/nova-ssh/Dockerfile b/images/nova-ssh/Dockerfile
index dd59388..37fc531 100644
--- a/images/nova-ssh/Dockerfile
+++ b/images/nova-ssh/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-runtime:main
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/nova/Dockerfile b/images/nova/Dockerfile
index c626858..968c013 100644
--- a/images/nova/Dockerfile
+++ b/images/nova/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG NOVA_GIT_REF=c199becf52267ba37c5191f6f82e29bb5232b607
 ADD --keep-git-dir=true https://opendev.org/openstack/nova.git#${NOVA_GIT_REF} /src/nova
 RUN git -C /src/nova fetch --unshallow
@@ -22,7 +24,7 @@
         /src/nova
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 ADD https://github.com/novnc/noVNC.git#v1.4.0 /usr/share/novnc
 RUN <<EOF bash -xe
 apt-get update -qq
diff --git a/images/octavia/Dockerfile b/images/octavia/Dockerfile
index d4dd8d3..53baf56 100644
--- a/images/octavia/Dockerfile
+++ b/images/octavia/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG OCTAVIA_GIT_REF=824b51a1dad80292b7a8ad5d61bf3ce706b1fb29
 ADD --keep-git-dir=true https://opendev.org/openstack/octavia.git#${OCTAVIA_GIT_REF} /src/octavia
 RUN git -C /src/octavia fetch --unshallow
@@ -25,7 +27,7 @@
         /src/ovn-octavia-provider
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/openstack-runtime/Dockerfile b/images/openstack-runtime/Dockerfile
index b5bbf82..0bd8099 100644
--- a/images/openstack-runtime/Dockerfile
+++ b/images/openstack-runtime/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-ARG FROM=registry.atmosphere.dev/library/ubuntu-cloud-archive:main
+ARG RELEASE
+
+ARG FROM=registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
 FROM ${FROM}
 ONBUILD ARG PROJECT
 ONBUILD ARG SHELL=/usr/sbin/nologin
diff --git a/images/openstack-venv-builder/Dockerfile b/images/openstack-venv-builder/Dockerfile
index 057af96..a9b017c 100644
--- a/images/openstack-venv-builder/Dockerfile
+++ b/images/openstack-venv-builder/Dockerfile
@@ -12,14 +12,16 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:main AS requirements
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE} AS requirements
 ADD https://releases.openstack.org/constraints/upper/master /upper-constraints.txt
 RUN <<EOF sh -xe
 sed -i '/glance-store/d' /upper-constraints.txt
 sed -i '/horizon/d' /upper-constraints.txt
 EOF
 
-FROM registry.atmosphere.dev/library/python-base:main
+FROM registry.atmosphere.dev/library/python-base:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/ovn/Dockerfile b/images/ovn/Dockerfile
index 065950b..43201d1 100644
--- a/images/ovn/Dockerfile
+++ b/images/ovn/Dockerfile
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+ARG RELEASE
+
 FROM golang:1.20 AS ovn-kubernetes
 ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
 ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src
@@ -22,7 +24,7 @@
 go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util
 EOF
 
-FROM registry.atmosphere.dev/library/openvswitch:main
+FROM registry.atmosphere.dev/library/openvswitch:${RELEASE}
 ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
 ARG OVN_SERIES=23.03
 ARG OVN_VERSION=${OVN_SERIES}.0-69
diff --git a/images/placement/Dockerfile b/images/placement/Dockerfile
index d729d15..be6c9f4 100644
--- a/images/placement/Dockerfile
+++ b/images/placement/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG PLACEMENT_GIT_REF=96a9aeb3b4a6ffff5bbf247b213409395239fc7a
 ADD --keep-git-dir=true https://opendev.org/openstack/placement.git#${PLACEMENT_GIT_REF} /src/placement
 RUN git -C /src/placement fetch --unshallow
@@ -22,5 +24,5 @@
         /src/placement
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 COPY --from=build --link /var/lib/openstack /var/lib/openstack
diff --git a/images/python-base/Dockerfile b/images/python-base/Dockerfile
index c098401..883a4f4 100644
--- a/images/python-base/Dockerfile
+++ b/images/python-base/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:main
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
 ENV PATH=/var/lib/openstack/bin:$PATH
 RUN \
     apt-get update -qq && \
diff --git a/images/senlin/Dockerfile b/images/senlin/Dockerfile
index 3f5490b..659e137 100644
--- a/images/senlin/Dockerfile
+++ b/images/senlin/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG SENLIN_GIT_REF=ec5fae997686c64c3c1192b231b2434e6a6aeb1c
 ADD --keep-git-dir=true https://opendev.org/openstack/senlin.git#${SENLIN_GIT_REF} /src/senlin
 RUN git -C /src/senlin fetch --unshallow
@@ -22,5 +24,5 @@
         /src/senlin
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 COPY --from=build --link /var/lib/openstack /var/lib/openstack
diff --git a/images/staffeln/Dockerfile b/images/staffeln/Dockerfile
index 167c978..c4fb1fb 100644
--- a/images/staffeln/Dockerfile
+++ b/images/staffeln/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG STAFFELN_GIT_REF=v2.2.3
 ADD --keep-git-dir=true https://github.com/vexxhost/staffeln.git#${STAFFELN_GIT_REF} /src/staffeln
 RUN git -C /src/staffeln fetch --unshallow
@@ -22,5 +24,5 @@
         /src/staffeln
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 COPY --from=build --link /var/lib/openstack /var/lib/openstack
diff --git a/images/tempest/Dockerfile b/images/tempest/Dockerfile
index 5c40c75..95746a8 100644
--- a/images/tempest/Dockerfile
+++ b/images/tempest/Dockerfile
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+ARG RELEASE
+
 FROM golang:1.18 AS octavia-test-server
 ADD --keep-git-dir=true https://opendev.org/openstack/octavia-tempest-plugin.git#master /src
 RUN GO111MODULE=off CGO_ENABLED=0 GOOS=linux go build \
@@ -19,7 +21,7 @@
     -o /build/test_server.bin \
     /src/octavia_tempest_plugin/contrib/test_server/test_server.go
 
-FROM registry.atmosphere.dev/library/openstack-venv-builder:main AS build
+FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
 ARG TEMPEST_GIT_REF=c0da6e843a74c2392c8e87e8ff36d2fea12949c4
 ADD --keep-git-dir=true https://opendev.org/openstack/tempest.git#${TEMPEST_GIT_REF} /src/tempest
 RUN git -C /src/tempest fetch --unshallow
@@ -48,7 +50,7 @@
         /src/octavia-tempest-plugin
 EOF
 
-FROM registry.atmosphere.dev/library/openstack-python-runtime:main
+FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
 RUN <<EOF bash -xe
 apt-get update -qq
 apt-get install -qq -y --no-install-recommends \
diff --git a/images/ubuntu-cloud-archive/Dockerfile b/images/ubuntu-cloud-archive/Dockerfile
index ed2ec3a..f355a48 100644
--- a/images/ubuntu-cloud-archive/Dockerfile
+++ b/images/ubuntu-cloud-archive/Dockerfile
@@ -12,7 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-FROM registry.atmosphere.dev/library/ubuntu:main
+ARG RELEASE
+
+FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
 COPY trusted.gpg.d/ubuntu-cloud-keyring.gpg /etc/apt/trusted.gpg.d/ubuntu-cloud-keyring.gpg
 COPY <<EOF /etc/apt/sources.list.d/cloudarchive.list
 deb http://ubuntu-cloud.archive.canonical.com/ubuntu jammy-updates/caracal main