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

Removed the 'build' target from zuul which just invokes
the devstack script which is un-supported.

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I59bd7c82c297e12969e31b5de9ac02d2a47834a6
This commit is contained in:
Al Bailey 2022-12-26 22:07:34 +00:00
parent ea4d279e4b
commit 13b24042a1
2 changed files with 6 additions and 20 deletions

View File

@ -12,7 +12,6 @@
- openstack-tox-linters - openstack-tox-linters
- openstack-tox-pep8 - openstack-tox-pep8
- fault-tox-pylint - fault-tox-pylint
- stx-fault-build
- fault-rest-api-py27 - fault-rest-api-py27
- fault-rest-api-py39 - fault-rest-api-py39
gate: gate:
@ -26,19 +25,6 @@
jobs: jobs:
- stx-fault-upload-git-mirror - stx-fault-upload-git-mirror
# Perform just a build
- job:
name: stx-fault-build
parent: tox
description: Run build for fault
irrelevant-files:
- api-ref/*
- docs/*
- releasenotes/*
vars:
tox_envlist: build
- job: - job:
name: flock-devstack-fault name: flock-devstack-fault
parent: flock-devstack-base-min parent: flock-devstack-base-min

12
tox.ini
View File

@ -21,7 +21,7 @@ setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8 LC_ALL=en_US.utf-8
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash allowlist_externals = bash
commands = commands =
bash -c 'if [ -d {toxinidir}/../zuul-jobs ]; then \ bash -c 'if [ -d {toxinidir}/../zuul-jobs ]; then \
find . \ find . \
@ -33,7 +33,7 @@ commands =
[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 \) \
@ -120,7 +120,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
@ -128,7 +128,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
@ -146,7 +146,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:build] [testenv:build]
deps = deps =
@ -154,7 +154,7 @@ commands = {toxinidir}/devstack/build.sh
[testenv:functional] [testenv:functional]
basepython = python3 basepython = python3
whitelist_externals = cat allowlist_externals = cat
commands = cat /etc/fm/fm.conf commands = cat /etc/fm/fm.conf
[testenv:bandit] [testenv:bandit]