Update tox.ini to work with tox 4

This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Remove the deprecated cgcs-patch(CentOS) jobs from zuul
sw-patch directory contains the Debian support.

Move from xenial to bionic for patch-alarm zuul job.

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ia0dcf61fc4a2c7911434158dd2e8bca7a787249a
This commit is contained in:
Al Bailey 2022-12-23 15:04:35 +00:00
parent 8b599699ea
commit 7b0ecddf20
5 changed files with 14 additions and 75 deletions

View File

@ -9,11 +9,7 @@
- openstack-tox-linters - openstack-tox-linters
- py3-bandit - py3-bandit
- py3-flake8 - py3-flake8
- patch-tox-pylint
- patch-tox-py27
- patch-tox-py39
- patch-alarm-tox-pylint - patch-alarm-tox-pylint
- patch-alarm-tox-py27
- patch-alarm-tox-py39 - patch-alarm-tox-py39
- sw-patch-tox-pylint - sw-patch-tox-pylint
- sw-patch-tox-py39 - sw-patch-tox-py39
@ -22,11 +18,7 @@
- openstack-tox-linters - openstack-tox-linters
- py3-bandit - py3-bandit
- py3-flake8 - py3-flake8
- patch-tox-pylint
- patch-tox-py27
- patch-tox-py39
- patch-alarm-tox-pylint - patch-alarm-tox-pylint
- patch-alarm-tox-py27
- patch-alarm-tox-py39 - patch-alarm-tox-py39
- sw-patch-tox-pylint - sw-patch-tox-pylint
- sw-patch-tox-py39 - sw-patch-tox-py39
@ -51,46 +43,6 @@
vars: vars:
tox_envlist: flake8 tox_envlist: flake8
- job:
name: patch-tox-pylint
parent: tox
nodeset: ubuntu-bionic
required-projects:
- starlingx/config
- starlingx/fault
files:
- cgcs-patch/cgcs-patch/*
vars:
tox_envlist: pylint
tox_extra_args: -c cgcs-patch/cgcs-patch/tox.ini
- job:
name: patch-tox-py27
parent: tox
nodeset: ubuntu-xenial
required-projects:
- starlingx/config
- starlingx/fault
files:
- cgcs-patch/cgcs-patch/*
vars:
tox_envlist: py27
tox_extra_args: -c cgcs-patch/cgcs-patch/tox.ini
- job:
name: patch-tox-py39
parent: tox-py39
nodeset: debian-bullseye
required-projects:
- starlingx/config
- starlingx/fault
files:
- cgcs-patch/cgcs-patch/*
vars:
tox_envlist: py39
python_version: 3.9
tox_extra_args: -c cgcs-patch/cgcs-patch/tox.ini
- job: - job:
name: sw-patch-tox-py39 name: sw-patch-tox-py39
parent: tox-py39 parent: tox-py39
@ -123,7 +75,7 @@
- job: - job:
name: patch-alarm-tox-pylint name: patch-alarm-tox-pylint
parent: tox parent: tox
nodeset: ubuntu-xenial nodeset: ubuntu-bionic
required-projects: required-projects:
- starlingx/config - starlingx/config
- starlingx/fault - starlingx/fault
@ -133,19 +85,6 @@
tox_envlist: pylint tox_envlist: pylint
tox_extra_args: -c patch-alarm/patch-alarm/tox.ini tox_extra_args: -c patch-alarm/patch-alarm/tox.ini
- job:
name: patch-alarm-tox-py27
parent: tox
nodeset: ubuntu-xenial
required-projects:
- starlingx/config
- starlingx/fault
files:
- patch-alarm/patch-alarm/*
vars:
tox_envlist: py27
tox_extra_args: -c patch-alarm/patch-alarm/tox.ini
- job: - job:
name: patch-alarm-tox-py39 name: patch-alarm-tox-py39
parent: tox-py39 parent: tox-py39

View File

@ -40,7 +40,7 @@ deps = -r{toxinidir}/requirements.txt
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv -e{[tox]stxdir}/config/sysinv/sysinv/sysinv
-e{[tox]stxdir}/config/tsconfig/tsconfig -e{[tox]stxdir}/config/tsconfig/tsconfig
whitelist_externals = find allowlist_externals = find
sh sh
[testenv:stestr] [testenv:stestr]

View File

@ -41,7 +41,7 @@ deps = -r{toxinidir}/requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig -e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/update/cgcs-patch/cgcs-patch -e{[tox]stxdir}/update/cgcs-patch/cgcs-patch
whitelist_externals = find allowlist_externals = find
sh sh
[testenv:stestr] [testenv:stestr]

View File

@ -41,7 +41,7 @@ setenv = VIRTUAL_ENV={envdir}
sitepackages = False sitepackages = False
usedevelop = true usedevelop = true
whitelist_externals = find allowlist_externals = find
sh sh
[testenv:stestr] [testenv:stestr]

20
tox.ini
View File

@ -44,11 +44,11 @@ deps = -r{toxinidir}/requirements.txt
-e{[testenv]cgcs_patch_dir} -e{[testenv]cgcs_patch_dir}
-e{[testenv]patch_alarm_dir} -e{[testenv]patch_alarm_dir}
whitelist_externals = find allowlist_externals = find
[testenv:linters] [testenv:linters]
basepython = python3 basepython = python3
whitelist_externals = bash allowlist_externals = bash
commands = commands =
bash -c "find {toxinidir} \ bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \ -not \( -type d -name .?\* -prune \) \
@ -96,7 +96,7 @@ max-line-length = 120
[testenv:flake8] [testenv:flake8]
basepython = python3 basepython = python3
whitelist_externals = cp allowlist_externals = cp
find find
tox tox
recreate = True recreate = True
@ -117,7 +117,7 @@ verbosity=2
[testenv:py27] [testenv:py27]
basepython = python2.7 basepython = python2.7
deps = {[testenv]deps} deps = {[testenv]deps}
whitelist_externals = cp allowlist_externals = cp
find find
tox tox
recreate = True recreate = True
@ -129,7 +129,7 @@ commands = {[testenv]commands}
[testenv:py36] [testenv:py36]
basepython = python3 basepython = python3
deps = {[testenv]deps} deps = {[testenv]deps}
whitelist_externals = cp allowlist_externals = cp
find find
tox tox
recreate = True recreate = True
@ -167,7 +167,7 @@ commands = bandit --ini tox.ini -r {toxinidir}/ -x '**/.tox/**,**/.eggs/**' -lll
[testenv:pylint] [testenv:pylint]
basepython = python3 basepython = python3
whitelist_externals = cp allowlist_externals = cp
find find
tox tox
recreate = True recreate = True
@ -179,7 +179,7 @@ commands = {[testenv]commands}
[testenv:cover] [testenv:cover]
basepython = python3 basepython = python3
deps = {[testenv]deps} deps = {[testenv]deps}
whitelist_externals = cp allowlist_externals = cp
find find
tox tox
recreate = True recreate = True
@ -194,7 +194,7 @@ deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
rm -rf doc/build rm -rf doc/build
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
whitelist_externals = rm allowlist_externals = rm
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3 basepython = python3
@ -202,7 +202,7 @@ deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
rm -rf releasenotes/build rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals = allowlist_externals =
rm rm
reno reno
@ -220,7 +220,7 @@ deps =
commands = commands =
rm -rf api-ref/build rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm allowlist_externals = rm
[testenv:bindep] [testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if # Do not install any requirements. We want this to be fast and work even if