Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable/zed] Refactor image tags to be dynamic #1122

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.

ARG RELEASE

FROM golang:1.21 AS go-builder
COPY go.mod go.sum /src/
WORKDIR /src
Expand All @@ -22,6 +24,6 @@ COPY cmd/ /src/cmd/
COPY internal/ /src/internal/
RUN go build -o main ./cmd/libvirt-tls-sidecar/main.go

FROM registry.atmosphere.dev/library/ubuntu:zed AS libvirt-tls-sidecar
FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS libvirt-tls-sidecar
COPY --from=libvirt-tls-sidecar-builder /src/main /usr/bin/libvirt-tls-sidecar
ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"]
15 changes: 1 addition & 14 deletions build/pin-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ def main():
parser.add_argument(
"dst", help="Path for output file", type=argparse.FileType("r+")
)
parser.add_argument(
"-r",
"--registry",
default="ghcr.io/vexxhost/atmosphere",
help="Registry containing Atmosphere images",
)

args = parser.parse_args()

Expand All @@ -145,15 +139,8 @@ def main():
if image in SKIP_IMAGE_LIST:
continue

# NOTE(mnaser): If we're in CI, only pin the Atmosphere images
if (
"registry.atmosphere.dev" in args.registry
and "ghcr.io/vexxhost/atmosphere" not in data["_atmosphere_images"][image]
):
continue

image_src = data["_atmosphere_images"][image].replace(
"ghcr.io/vexxhost/atmosphere", args.registry
"{{ atmosphere_release }}", data["atmosphere_release"]
)
pinned_image = get_pinned_image(image_src)

Expand Down
6 changes: 4 additions & 2 deletions images/barbican/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG BARBICAN_GIT_REF=7d6749fcb1ad16a3350de82cd8e523d5b55306f8
ADD --keep-git-dir=true https://opendev.org/openstack/barbican.git#${BARBICAN_GIT_REF} /src/barbican
RUN git -C /src/barbican fetch --unshallow
Expand All @@ -23,5 +25,5 @@ pip3 install \
pykmip
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
COPY --from=build --link /var/lib/openstack /var/lib/openstack
6 changes: 4 additions & 2 deletions images/cinder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG CINDER_GIT_REF=f74e2729554bee01b0a3e631a8001bb39e540433
ADD --keep-git-dir=true https://opendev.org/openstack/cinder.git#${CINDER_GIT_REF} /src/cinder
RUN git -C /src/cinder fetch --unshallow
Expand All @@ -23,7 +25,7 @@ pip3 install \
purestorage
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/designate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG DESIGNATE_GIT_REF=d247267823034c5e656f74e91b50475aa54d3fa6
ADD --keep-git-dir=true https://opendev.org/openstack/designate.git#${DESIGNATE_GIT_REF} /src/designate
RUN git -C /src/designate fetch --unshallow
Expand All @@ -22,7 +24,7 @@ pip3 install \
/src/designate
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/glance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG GLANCE_GIT_REF=06a18202ab52c64803f044b8f848ed1c160905d2
ADD --keep-git-dir=true https://opendev.org/openstack/glance.git#${GLANCE_GIT_REF} /src/glance
RUN git -C /src/glance fetch --unshallow
Expand All @@ -27,7 +29,7 @@ pip3 install \
/src/glance_store[cinder]
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/heat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HEAT_GIT_REF=d3948706a3ff28d0160157f76f1e18244a8dad5c
ADD --keep-git-dir=true https://opendev.org/openstack/heat.git#${HEAT_GIT_REF} /src/heat
RUN git -C /src/heat fetch --unshallow
Expand All @@ -22,7 +24,7 @@ pip3 install \
/src/heat
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/horizon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HORIZON_GIT_REF=5de40f9b222608d35c5a0919117259e966217a86
ADD --keep-git-dir=true https://opendev.org/openstack/horizon.git#${HORIZON_GIT_REF} /src/horizon
RUN git -C /src/horizon fetch --unshallow
Expand Down Expand Up @@ -50,7 +52,7 @@ pip3 install \
/src/senlin-dashboard
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/ironic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG IRONIC_GIT_REF=995fa6c048297211deceddb05b00bbd34ef27eb6
ADD --keep-git-dir=true https://opendev.org/openstack/ironic.git#${IRONIC_GIT_REF} /src/ironic
RUN git -C /src/ironic fetch --unshallow
Expand All @@ -24,7 +26,7 @@ pip3 install \
sushy
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/keepalived/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/ubuntu:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/keystone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG KEYSTONE_GIT_REF=f63062d47712406a807ce07b4ff3ec6213b0e824
ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
RUN git -C /src/keystone fetch --unshallow
Expand All @@ -25,7 +27,7 @@ pip3 install \
keystone-keycloak-backend==0.1.8
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/libvirtd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-runtime:zed
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
Expand Down
8 changes: 5 additions & 3 deletions images/magnum/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/ubuntu:zed AS helm
ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
ARG TARGETOS
ARG TARGETARCH
ARG HELM_VERSION=3.14.0
ADD https://get.helm.sh/helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /helm.tar.gz
RUN tar -xzf /helm.tar.gz
RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG MAGNUM_GIT_REF=0ee979099a01ae2c8b1b5d6757897a8993e4e34c
ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
RUN git -C /src/magnum fetch --unshallow
Expand All @@ -33,7 +35,7 @@ pip3 install \
magnum-cluster-api==0.16.0
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/manila/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG MANILA_GIT_REF=c0fc23a39f87629b59fae7bbf46f70e3e1b459cd
ADD --keep-git-dir=true https://opendev.org/openstack/manila.git#${MANILA_GIT_REF} /src/manila
RUN git -C /src/manila fetch --unshallow
Expand All @@ -24,7 +26,7 @@ pip3 install \
/src/manila
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/netoffload/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:zed
FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
6 changes: 4 additions & 2 deletions images/neutron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG NEUTRON_GIT_REF=ca25eb96f16dbe5ff1ca4446534f9a1d12fa7035
ADD --keep-git-dir=true https://opendev.org/openstack/neutron.git#${NEUTRON_GIT_REF} /src/neutron
RUN git -C /src/neutron fetch --unshallow
Expand All @@ -27,7 +29,7 @@ pip3 install \
/src/neutron-vpnaas
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/nova-ssh/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-runtime:zed
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 \
Expand Down
6 changes: 4 additions & 2 deletions images/nova/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG NOVA_GIT_REF=b4a69447e2a176fd3821abc427019339ec700f0c
ADD --keep-git-dir=true https://opendev.org/openstack/nova.git#${NOVA_GIT_REF} /src/nova
RUN git -C /src/nova fetch --unshallow
Expand All @@ -22,7 +24,7 @@ pip3 install \
/src/nova
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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
Expand Down
6 changes: 4 additions & 2 deletions images/octavia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/openstack-venv-builder:zed AS build
ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG OCTAVIA_GIT_REF=000b577f3e9c9ff7cb893e9f6e635753017a78c6
ADD --keep-git-dir=true https://opendev.org/openstack/octavia.git#${OCTAVIA_GIT_REF} /src/octavia
RUN git -C /src/octavia fetch --unshallow
Expand All @@ -25,7 +27,7 @@ pip3 install \
/src/ovn-octavia-provider
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:zed
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 \
Expand Down
4 changes: 3 additions & 1 deletion images/openstack-runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:zed
ARG RELEASE

ARG FROM=registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
FROM ${FROM}
ONBUILD ARG PROJECT
ONBUILD ARG SHELL=/usr/sbin/nologin
Expand Down
6 changes: 4 additions & 2 deletions images/openstack-venv-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:zed AS requirements
ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE} AS requirements
ADD https://releases.openstack.org/constraints/upper/zed /upper-constraints.txt
RUN <<EOF sh -xe
sed -i 's/cryptography===36.0.2/cryptography===42.0.4/' /upper-constraints.txt
Expand All @@ -32,7 +34,7 @@ sed -i '/glance-store/d' /upper-constraints.txt
sed -i '/horizon/d' /upper-constraints.txt
EOF

FROM registry.atmosphere.dev/library/python-base:zed
FROM registry.atmosphere.dev/library/python-base:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
Loading