Pin tox to be less than 4

The dev environment used by some docs developers uses
an old version of tox, and does not support the
allowlist_externals entry required by tox 4.

The version of tox used by some other developers cannot
support tox.ini that contains both allowlist_externals and
whitelist_externals in the same file.

The fix for now is to stay with whitelist_externals and tox<4

This fix mostly reverts and re-works these two commits
https://review.opendev.org/c/starlingx/docs/+/869229
https://review.opendev.org/c/starlingx/docs/+/868621

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ib8a5eea5d27e7b7347bc717d11f9dc5a0be4f396
This commit is contained in:
Al Bailey 2023-01-13 13:48:38 +00:00 committed by Al Bailey
parent dc40df6818
commit 5c86db74c8
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,7 @@
---
- project:
vars:
ensure_tox_version: '<4'
templates:
- stx-api-ref-jobs
check:

18
tox.ini
View File

@ -29,24 +29,24 @@ commands =
git restore doc/source/dist_cloud/kubernetes/*
bash hw-updates.sh
bash htmlChecks.sh doc/build/html
allowlist_externals = bash
# Note: The dev env for the docs team uses a version of tox that does not yet support allowlist_externals
whitelist_externals = bash
htmlChecks.sh
get-remote-files.sh
git
# hw-updates.sh
whitelist_externals = {[testenv:docs]allowlist_externals}
[testenv:api-ref]
deps = {[testenv:docs]deps}
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
allowlist_externals = rm
whitelist_externals = {[testenv:api-ref]allowlist_externals}
whitelist_externals = rm
[testenv:linters]
allowlist_externals = bash
whitelist_externals = {[testenv:linters]allowlist_externals}
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
\( -name .tox -prune \) \
@ -64,16 +64,14 @@ passenv=PWD
commands =
bash -c "echo Running in {env:PWD}"
bash new-topic.sh {env:PWD} {toxinidir}
allowlist_externals = new-topic.sh
whitelist_externals = new-topic.sh
bash
whitelist_externals = {[testenv:newfile]allowlist_externals}
[testenv:picks]
commands =
./pickCompare.sh
allowlist_externals = pickCompare.sh
whitelist_externals = pickCompare.sh
bash
whitelist_externals = {[testenv:picks]allowlist_externals}
[testenv:linkcheck]