From 90effa2af0b37d3fbb6881641a025acebebb35d2 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 20 Apr 2022 08:39:52 -0700 Subject: [PATCH] Add Bullseye Python 3.10 base images Now that we've cleaned up the old unused images we can look forward to new Python. Add Python 3.10 base images based on Bullseye. As part of this process we update the default var values in our Dockerfiles to set Bullseye and Python3.10 as our defaults as these should be valid for some time. We also tidy up some yaml anchor names to make future copy and paste for new versions of images easier to perform text replacement on. Change-Id: I4943a9178334c4bdf10ee5601e39004d6783b34c --- docker/python-base/Dockerfile | 4 +- docker/python-builder/Dockerfile | 4 +- docker/uwsgi-base/Dockerfile | 4 +- .../docker-images/python-3.10-bullseye.yaml | 129 ++++++++++++++++++ zuul.d/docker-images/python-3.8-bullseye.yaml | 12 +- zuul.d/docker-images/python-3.9-bullseye.yaml | 12 +- zuul.d/project.yaml | 9 ++ 7 files changed, 156 insertions(+), 18 deletions(-) create mode 100644 zuul.d/docker-images/python-3.10-bullseye.yaml diff --git a/docker/python-base/Dockerfile b/docker/python-base/Dockerfile index c4100afc41..5b0f1f88c4 100644 --- a/docker/python-base/Dockerfile +++ b/docker/python-base/Dockerfile @@ -15,8 +15,8 @@ # Comment to force rebuilds Tue Aug 3 19:59:32 UTC 2021 -ARG PYTHON_VERSION=3.7 -ARG DEBIAN_VERSION=buster +ARG PYTHON_VERSION=3.10 +ARG DEBIAN_VERSION=bullseye FROM docker.io/library/python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} # Necessary to use this var in the RUN below ARG DEBIAN_VERSION diff --git a/docker/python-builder/Dockerfile b/docker/python-builder/Dockerfile index e7f6bb5f69..5aa8b485c0 100644 --- a/docker/python-builder/Dockerfile +++ b/docker/python-builder/Dockerfile @@ -15,8 +15,8 @@ # Comment to force rebuilds Tue Aug 3 19:59:32 UTC 2021 -ARG PYTHON_VERSION=3.7 -ARG DEBIAN_VERSION=buster +ARG PYTHON_VERSION=3.10 +ARG DEBIAN_VERSION=bullseye FROM docker.io/library/python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as fake-python WORKDIR /tmp diff --git a/docker/uwsgi-base/Dockerfile b/docker/uwsgi-base/Dockerfile index a31e6a55d2..5f7853ddbe 100644 --- a/docker/uwsgi-base/Dockerfile +++ b/docker/uwsgi-base/Dockerfile @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG PYTHON_VERSION=3.7 -ARG DEBIAN_VERSION=buster +ARG PYTHON_VERSION=3.10 +ARG DEBIAN_VERSION=bullseye FROM docker.io/opendevorg/python-builder:${PYTHON_VERSION}-${DEBIAN_VERSION} as builder ARG PYTHON_VERSION diff --git a/zuul.d/docker-images/python-3.10-bullseye.yaml b/zuul.d/docker-images/python-3.10-bullseye.yaml new file mode 100644 index 0000000000..b046c48b9f --- /dev/null +++ b/zuul.d/docker-images/python-3.10-bullseye.yaml @@ -0,0 +1,129 @@ +# python-builder-3.10-bullseye jobs +- job: + name: system-config-build-image-python-builder-3.10-bullseye + description: Build a python-builder-3.10-bullseye image. + parent: system-config-build-image + provides: + - python-builder-container-image + - python-builder-3.10-bullseye-container-image + vars: &python-builder_3_10_bullseye_vars + docker_images: + - context: docker/python-builder + repository: opendevorg/python-builder + tags: + - 3.10-bullseye + arch: + - linux/amd64 + - linux/arm64 + build_args: + - PYTHON_VERSION=3.10 + - DEBIAN_VERSION=bullseye + files: &python-builder_3_10_bullseye_files + - docker/python-base/ + - docker/python-builder/ + +- job: + name: system-config-upload-image-python-builder-3.10-bullseye + description: Build and upload a python-builder-3.10-bullseye image. + parent: system-config-upload-image + provides: + - python-builder-container-image + - python-builder-3.10-bullseye-container-image + vars: *python-builder_3_10_bullseye_vars + files: *python-builder_3_10_bullseye_files + +- job: + name: system-config-promote-image-python-builder-3.10-bullseye + description: Promote a previously published python-builder-3.10-bullseye image to latest. + parent: system-config-promote-image + vars: *python-builder_3_10_bullseye_vars + files: *python-builder_3_10_bullseye_files + +- job: + name: system-config-build-image-python-base-3.10-bullseye + description: Build a python-base-3.10-bullseye image. + parent: system-config-build-image + provides: + - python-base-container-image + - python-base-3.10-container-image + vars: &python-base_3_10_bullseye_vars + docker_images: + - context: docker/python-base + repository: opendevorg/python-base + tags: + - 3.10-bullseye + arch: + - linux/amd64 + - linux/arm64 + build_args: + - PYTHON_VERSION=3.10 + - DEBIAN_VERSION=bullseye + files: &python-base_3_10_bullseye_files + - docker/python-base/ + - docker/python-builder/ + +- job: + name: system-config-upload-image-python-base-3.10-bullseye + description: Build and upload a python-base-3.10-bullseye image. + parent: system-config-upload-image + provides: python-base-3.10-bullseye-container-image + vars: *python-base_3_10_bullseye_vars + files: *python-base_3_10_bullseye_files + +- job: + name: system-config-promote-image-python-base-3.10-bullseye + description: Promote a previously published python-base-3.10-bullseye image to latest. + parent: system-config-promote-image + vars: *python-base_3_10_bullseye_vars + files: *python-base_3_10_bullseye_files + +- job: + name: system-config-build-image-uwsgi-base-3.10-bullseye + description: Build a uwsgi-base-3.10-bullseye image. + parent: system-config-build-image + requires: &uwsgi-base_3_10_bullseye_requires + - python-base-3.10-bullseye-container-image + - python-builder-3.10-bullseye-container-image + provides: uwsgi-base-3.10-bullseye-container-image + dependencies: + - name: system-config-build-image-python-base-3.10-bullseye + soft: true + - name: system-config-build-image-python-builder-3.10-bullseye + soft: true + vars: &uwsgi-base_3_10_bullseye_vars + docker_images: + - context: docker/uwsgi-base + repository: opendevorg/uwsgi-base + tags: + - 3.10-bullseye + arch: + - linux/amd64 + - linux/arm64 + build_args: + - PYTHON_VERSION=3.10 + - DEBIAN_VERSION=bullseye + files: &uwsgi-base_3_10_bullseye_files + - docker/python-base/.* + - docker/python-builder/.* + - docker/uwsgi-base/.* + +- job: + name: system-config-upload-image-uwsgi-base-3.10-bullseye + description: Build and upload a uwsgi-base-3.10-bullseye image. + parent: system-config-upload-image + provides: uwsgi-base-3.10-bullseye-container-image + requires: *uwsgi-base_3_10_bullseye_requires + dependencies: + - name: system-config-upload-image-python-base-3.10-bullseye + soft: true + - name: system-config-upload-image-python-builder-3.10-bullseye + soft: true + vars: *uwsgi-base_3_10_bullseye_vars + files: *uwsgi-base_3_10_bullseye_files + +- job: + name: system-config-promote-image-uwsgi-base-3.10-bullseye + description: Promote a previously published uwsgi-base-3.10-bullseye image to latest. + parent: system-config-promote-image + vars: *uwsgi-base_3_10_bullseye_vars + files: *uwsgi-base_3_10_bullseye_files diff --git a/zuul.d/docker-images/python-3.8-bullseye.yaml b/zuul.d/docker-images/python-3.8-bullseye.yaml index 52bb0b5135..8b9436d065 100644 --- a/zuul.d/docker-images/python-3.8-bullseye.yaml +++ b/zuul.d/docker-images/python-3.8-bullseye.yaml @@ -46,7 +46,7 @@ provides: - python-base-container-image - python-base-3.8-container-image - vars: &python-base-3_8_bullseye_vars + vars: &python-base_3_8_bullseye_vars docker_images: - context: docker/python-base repository: opendevorg/python-base @@ -58,7 +58,7 @@ build_args: - PYTHON_VERSION=3.8 - DEBIAN_VERSION=bullseye - files: &python-base-3_8_bullseye_files + files: &python-base_3_8_bullseye_files - docker/python-base/ - docker/python-builder/ @@ -67,15 +67,15 @@ description: Build and upload a python-base-3.8-bullseye image. parent: system-config-upload-image provides: python-base-3.8-bullseye-container-image - vars: *python-base-3_8_bullseye_vars - files: *python-base-3_8_bullseye_files + vars: *python-base_3_8_bullseye_vars + files: *python-base_3_8_bullseye_files - job: name: system-config-promote-image-python-base-3.8-bullseye description: Promote a previously published python-base-3.8-bullseye image to latest. parent: system-config-promote-image - vars: *python-base-3_8_bullseye_vars - files: *python-base-3_8_bullseye_files + vars: *python-base_3_8_bullseye_vars + files: *python-base_3_8_bullseye_files - job: name: system-config-build-image-uwsgi-base-3.8-bullseye diff --git a/zuul.d/docker-images/python-3.9-bullseye.yaml b/zuul.d/docker-images/python-3.9-bullseye.yaml index 0c59e6d5ca..04ed99266e 100644 --- a/zuul.d/docker-images/python-3.9-bullseye.yaml +++ b/zuul.d/docker-images/python-3.9-bullseye.yaml @@ -46,7 +46,7 @@ provides: - python-base-container-image - python-base-3.9-container-image - vars: &python-base-3_9_bullseye_vars + vars: &python-base_3_9_bullseye_vars docker_images: - context: docker/python-base repository: opendevorg/python-base @@ -58,7 +58,7 @@ build_args: - PYTHON_VERSION=3.9 - DEBIAN_VERSION=bullseye - files: &python-base-3_9_bullseye_files + files: &python-base_3_9_bullseye_files - docker/python-base/ - docker/python-builder/ @@ -67,15 +67,15 @@ description: Build and upload a python-base-3.9-bullseye image. parent: system-config-upload-image provides: python-base-3.9-bullseye-container-image - vars: *python-base-3_9_bullseye_vars - files: *python-base-3_9_bullseye_files + vars: *python-base_3_9_bullseye_vars + files: *python-base_3_9_bullseye_files - job: name: system-config-promote-image-python-base-3.9-bullseye description: Promote a previously published python-base-3.9-bullseye image to latest. parent: system-config-promote-image - vars: *python-base-3_9_bullseye_vars - files: *python-base-3_9_bullseye_files + vars: *python-base_3_9_bullseye_vars + files: *python-base_3_9_bullseye_files - job: name: system-config-build-image-uwsgi-base-3.9-bullseye diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index ff2689a41d..9b3151535b 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -144,10 +144,13 @@ soft: true - system-config-build-image-python-base-3.8-bullseye - system-config-build-image-python-base-3.9-bullseye + - system-config-build-image-python-base-3.10-bullseye - system-config-build-image-python-builder-3.8-bullseye - system-config-build-image-python-builder-3.9-bullseye + - system-config-build-image-python-builder-3.10-bullseye - system-config-build-image-uwsgi-base-3.8-bullseye - system-config-build-image-uwsgi-base-3.9-bullseye + - system-config-build-image-uwsgi-base-3.10-bullseye check-arm64: jobs: - system-config-run-base-arm64 @@ -279,10 +282,13 @@ soft: true - system-config-upload-image-python-base-3.8-bullseye - system-config-upload-image-python-base-3.9-bullseye + - system-config-upload-image-python-base-3.10-bullseye - system-config-upload-image-python-builder-3.8-bullseye - system-config-upload-image-python-builder-3.9-bullseye + - system-config-upload-image-python-builder-3.10-bullseye - system-config-upload-image-uwsgi-base-3.8-bullseye - system-config-upload-image-uwsgi-base-3.9-bullseye + - system-config-upload-image-uwsgi-base-3.10-bullseye promote: jobs: - opendev-promote-docs @@ -302,10 +308,13 @@ - system-config-promote-image-matrix-eavesdrop - system-config-promote-image-python-base-3.8-bullseye - system-config-promote-image-python-base-3.9-bullseye + - system-config-promote-image-python-base-3.10-bullseye - system-config-promote-image-python-builder-3.8-bullseye - system-config-promote-image-python-builder-3.9-bullseye + - system-config-promote-image-python-builder-3.10-bullseye - system-config-promote-image-uwsgi-base-3.8-bullseye - system-config-promote-image-uwsgi-base-3.9-bullseye + - system-config-promote-image-uwsgi-base-3.10-bullseye # NOTE: infra-prod-* jobs have a hierarchy below that ensure # they can run in parallel. We are deliberately keeping their