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

View File

@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# 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
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
RUN /output/install-from-bindep

View File

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

View File

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

View File

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