Fix charm for tox4 compatibility
Related-Bug: 2002788 Change-Id: I49c3864dbe7ad476e67c6ade54d352e0520682b9
This commit is contained in:
parent
bb16e670dc
commit
fc3462b6a7
26
osci.yaml
26
osci.yaml
@ -27,7 +27,7 @@
|
||||
needs_charm_build: true
|
||||
charm_build_name: ceph-radosgw
|
||||
build_type: charmcraft
|
||||
charmcraft_channel: 2.0/stable
|
||||
charmcraft_channel: 2.1/stable
|
||||
- job:
|
||||
name: focal-yoga-multisite
|
||||
parent: func-target
|
||||
@ -39,7 +39,7 @@
|
||||
- name: tox-py310
|
||||
soft: true
|
||||
vars:
|
||||
tox_extra_args: focal-yoga-multisite
|
||||
tox_extra_args: '-- focal-yoga-multisite'
|
||||
- job:
|
||||
name: jammy-yoga-multisite
|
||||
parent: func-target
|
||||
@ -49,49 +49,49 @@
|
||||
- name: tox-py310
|
||||
soft: true
|
||||
vars:
|
||||
tox_extra_args: jammy-yoga-multisite
|
||||
tox_extra_args: '-- jammy-yoga-multisite'
|
||||
- job:
|
||||
name: jammy-zed-multisite
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- jammy-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: jammy-zed-multisite
|
||||
tox_extra_args: '-- jammy-zed-multisite'
|
||||
- job:
|
||||
name: kinetic-zed-multisite
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- jammy-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: kinetic-zed-multisite
|
||||
tox_extra_args: '-- kinetic-zed-multisite'
|
||||
- job:
|
||||
name: vault-focal-yoga_rgw
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- focal-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: vault:focal-yoga
|
||||
tox_extra_args: '-- vault:focal-yoga'
|
||||
- job:
|
||||
name: vault-jammy-yoga_rgw
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- jammy-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: vault:jammy-yoga
|
||||
tox_extra_args: '-- vault:jammy-yoga'
|
||||
- job:
|
||||
name: vault-focal-yoga-namespaced
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- focal-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: vault:focal-yoga-namespaced
|
||||
tox_extra_args: '-- vault:focal-yoga-namespaced'
|
||||
- job:
|
||||
name: vault-jammy-yoga-namespaced
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- jammy-yoga-multisite
|
||||
vars:
|
||||
tox_extra_args: vault:jammy-yoga-namespaced
|
||||
tox_extra_args: '-- vault:jammy-yoga-namespaced'
|
||||
- job:
|
||||
name: vault-jammy-zed_rgw
|
||||
parent: func-target
|
||||
@ -99,7 +99,7 @@
|
||||
- vault-jammy-yoga_rgw
|
||||
- vault-jammy-yoga-namespaced
|
||||
vars:
|
||||
tox_extra_args: vault:jammy-zed
|
||||
tox_extra_args: '-- vault:jammy-zed'
|
||||
- job:
|
||||
name: vault-jammy-zed-namespaced
|
||||
parent: func-target
|
||||
@ -107,7 +107,7 @@
|
||||
- vault-jammy-yoga_rgw
|
||||
- vault-jammy-yoga-namespaced
|
||||
vars:
|
||||
tox_extra_args: vault:jammy-zed-namespaced
|
||||
tox_extra_args: '-- vault:jammy-zed-namespaced'
|
||||
- job:
|
||||
name: vault-kinetic-zed_rgw
|
||||
parent: func-target
|
||||
@ -115,7 +115,7 @@
|
||||
- vault-jammy-yoga_rgw
|
||||
- vault-jammy-yoga-namespaced
|
||||
vars:
|
||||
tox_extra_args: vault:kinetic-zed
|
||||
tox_extra_args: '-- vault:kinetic-zed'
|
||||
- job:
|
||||
name: vault-kinetic-zed-namespaced
|
||||
parent: func-target
|
||||
@ -123,4 +123,4 @@
|
||||
- vault-jammy-yoga_rgw
|
||||
- vault-jammy-yoga-namespaced
|
||||
vars:
|
||||
tox_extra_args: vault:kinetic-zed-namespaced
|
||||
tox_extra_args: '-- vault:kinetic-zed-namespaced'
|
||||
|
18
pip.sh
18
pip.sh
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This file is managed centrally by release-tools and should not be modified
|
||||
# within individual charm repos. See the 'global' dir contents for available
|
||||
# choices of tox.ini for OpenStack Charms:
|
||||
# https://github.com/openstack-charmers/release-tools
|
||||
#
|
||||
# setuptools 58.0 dropped the support for use_2to3=true which is needed to
|
||||
# install blessings (an indirect dependency of charm-tools).
|
||||
#
|
||||
# More details on the beahvior of tox and virtualenv creation can be found at
|
||||
# https://github.com/tox-dev/tox/issues/448
|
||||
#
|
||||
# This script is wrapper to force the use of the pinned versions early in the
|
||||
# process when the virtualenv was created and upgraded before installing the
|
||||
# depedencies declared in the target.
|
||||
pip install 'pip<20.3' 'setuptools<50.0.0'
|
||||
pip "$@"
|
@ -8,7 +8,6 @@
|
||||
# all of its own requirements and if it doesn't, fix it there.
|
||||
#
|
||||
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
|
||||
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
|
||||
|
||||
requests>=2.18.4
|
||||
|
||||
@ -26,5 +25,5 @@ git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.open
|
||||
# Needed for charm-glance:
|
||||
git+https://opendev.org/openstack/tempest.git#egg=tempest
|
||||
|
||||
pyopenssl<=22.0.0
|
||||
croniter # needed for charm-rabbitmq-server unit tests
|
||||
psutil
|
||||
|
43
tox.ini
43
tox.ini
@ -9,56 +9,43 @@
|
||||
# all of its own requirements and if it doesn't, fix it there.
|
||||
[tox]
|
||||
envlist = pep8,py3
|
||||
skipsdist = True
|
||||
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
|
||||
sitepackages = False
|
||||
# NOTE: Avoid false positives by not skipping missing interpreters.
|
||||
skip_missing_interpreters = False
|
||||
# NOTES:
|
||||
# * We avoid the new dependency resolver by pinning pip < 20.3, see
|
||||
# https://github.com/pypa/pip/issues/9187
|
||||
# * Pinning dependencies requires tox >= 3.2.0, see
|
||||
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
|
||||
# * It is also necessary to pin virtualenv as a newer virtualenv would still
|
||||
# lead to fetching the latest pip in the func* tox targets, see
|
||||
# https://stackoverflow.com/a/38133283
|
||||
requires =
|
||||
pip < 20.3
|
||||
virtualenv < 20.0
|
||||
setuptools < 50.0.0
|
||||
|
||||
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
|
||||
minversion = 3.18.0
|
||||
|
||||
[testenv]
|
||||
# We use tox mainly for virtual environment management for test requirements
|
||||
# and do not install the charm code as a Python package into that environment.
|
||||
# Ref: https://tox.wiki/en/latest/config.html#skip_install
|
||||
skip_install = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
CHARM_DIR={envdir}
|
||||
install_command =
|
||||
{toxinidir}/pip.sh install {opts} {packages}
|
||||
commands = stestr run --slowest {posargs}
|
||||
allowlist_externals =
|
||||
charmcraft
|
||||
rename.sh
|
||||
passenv = HOME TERM CS_* OS_* TEST_*
|
||||
passenv =
|
||||
HOME
|
||||
TERM
|
||||
CS_*
|
||||
OS_*
|
||||
TEST_*
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:build]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/build-requirements.txt
|
||||
# charmcraft clean is done to ensure that
|
||||
# `tox -e build` always performs a clean, repeatable build.
|
||||
# For faster rebuilds during development,
|
||||
# directly run `charmcraft -v pack && ./rename.sh`.
|
||||
commands =
|
||||
charmcraft clean
|
||||
charmcraft -v pack
|
||||
{toxinidir}/rename.sh
|
||||
|
||||
[testenv:py38]
|
||||
basepython = python3.8
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
[testenv:py39]
|
||||
basepython = python3.9
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
charmcraft clean
|
||||
|
||||
[testenv:py310]
|
||||
basepython = python3.10
|
||||
|
Loading…
x
Reference in New Issue
Block a user