Update gear to python3.11 and Bookworm container

This is motivated by OpenDev's desire to drop the old Bullseye container
images as well as container images for older versions of python. We bump
testing to python3.11 on the high end of the range and convert the
container image to python3.11 + Bookworm.

Python 2.7 testing is removed because tox + virtualenv can't actually
create python2.7 virtualenvs any longer. There are workarounds but
dropping the tests is simpler.

Python 3.5 testing is replaced with 3.6 testing beacuse the version of
easy_install on ubuntu xenial does not understand TLS + SNI. A while
back pypi.org dropped non SNI connection support which means we can't
install PBR for to run the setup.py for the projcet. There are
workarounds but 3.5 is old enough taht we should be able to move on.

Change-Id: I2f2a2d0cf71c69d7babd6df9bfdb41a759e9c0ee
This commit is contained in:
Clark Boylan 2023-09-20 10:22:38 -07:00
parent 76324ab5fa
commit 97d2061226
5 changed files with 19 additions and 22 deletions

View File

@ -19,8 +19,8 @@
parent: opendev-build-docker-image parent: opendev-build-docker-image
description: Build OpenDev Docker images for gear description: Build OpenDev Docker images for gear
requires: requires:
- python-base-3.9-bullseye-container-image - python-base-3.11-bookworm-container-image
- python-builder-3.9-bullseye-container-image - python-builder-3.11-bookworm-container-image
provides: gear-container-image provides: gear-container-image
vars: &gear_opendev_image_vars vars: &gear_opendev_image_vars
zuul_work_dir: src/opendev.org/opendev/gear zuul_work_dir: src/opendev.org/opendev/gear
@ -34,8 +34,8 @@
parent: opendev-upload-docker-image parent: opendev-upload-docker-image
description: Build OpenDev gear Docker images and upload to Docker Hub. description: Build OpenDev gear Docker images and upload to Docker Hub.
requires: requires:
- python-base-3.9-bullseye-container-image - python-base-3.11-bookworm-container-image
- python-builder-3.9-bullseye-container-image - python-builder-3.11-bookworm-container-image
provides: gear-container-image provides: gear-container-image
vars: *gear_opendev_image_vars vars: *gear_opendev_image_vars
secrets: secrets:
@ -61,24 +61,22 @@
check: check:
jobs: jobs:
- tox-linters - tox-linters
- tox-py27 - tox-py36:
- tox-py35: nodeset: ubuntu-bionic
nodeset: ubuntu-xenial - tox-py311:
- tox-py39: nodeset: ubuntu-jammy
nodeset: ubuntu-focal
- build-python-release: - build-python-release:
nodeset: ubuntu-focal nodeset: ubuntu-jammy
- gear-build-opendev-image - gear-build-opendev-image
gate: gate:
jobs: jobs:
- tox-linters - tox-linters
- tox-py27 - tox-py36:
- tox-py35: nodeset: ubuntu-bionic
nodeset: ubuntu-xenial - tox-py311:
- tox-py39: nodeset: ubuntu-jammy
nodeset: ubuntu-focal
- build-python-release: - build-python-release:
nodeset: ubuntu-focal nodeset: ubuntu-jammy
- gear-upload-opendev-image - gear-upload-opendev-image
promote: promote:
jobs: jobs:
@ -87,7 +85,7 @@
release: release:
jobs: jobs:
- opendev-release-python: - opendev-release-python:
nodeset: ubuntu-focal nodeset: ubuntu-jammy
- upload-docker-image: - upload-docker-image:
secrets: secrets:
name: docker_credentials name: docker_credentials

View File

@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM opendevorg/python-builder:3.9-bullseye as builder FROM opendevorg/python-builder:3.11-bookworm as builder
COPY . /tmp/src COPY . /tmp/src
RUN assemble RUN assemble
FROM opendevorg/python-base:3.9-bullseye as geard FROM opendevorg/python-base:3.11-bookworm as geard
COPY --from=builder /output/ /output COPY --from=builder /output/ /output
RUN /output/install-from-bindep RUN /output/install-from-bindep

View File

@ -3,7 +3,6 @@
libffi-dev [platform:dpkg] libffi-dev [platform:dpkg]
libffi-devel [platform:rpm] libffi-devel [platform:rpm]
python-dev [platform:dpkg]
python-devel [platform:rpm] python-devel [platform:rpm]
python3-all-dev [platform:ubuntu !platform:ubuntu-precise] python3-all-dev [platform:ubuntu !platform:ubuntu-precise]
python3-dev [platform:dpkg] python3-dev [platform:dpkg]

View File

@ -31,6 +31,8 @@ classifier =
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
[files] [files]
packages = packages =

View File

@ -1,12 +1,10 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
skipsdist = True
envlist = py3,py27,linters envlist = py3,py27,linters
ignore_basepython_conflict = true ignore_basepython_conflict = true
[testenv] [testenv]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
usedevelop = True
basepython = python3 basepython = python3
install_command = pip install {opts} {packages} install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt