Reported upstream https://github.com/tox-dev/tox/issues/3115
Tox jobs got upgraded to tox 4 (T345152) and as part of the rewrite upstream dropped support for the tox:jenkins section. In the Upstream documentation for the breaking change:
People who still want Jenkins override support may create a tox plugin to achieve this functionality
We typically use tox:jenkins to override the list of environments and/or ensuring to not skip on missing interpreters.
Examples
https://gerrit.wikimedia.org/r/c/labs/tools/wikinity/+/954748
[tox] envlist = lint,test skipsdist = True [tox:jenkins] envlist = lint,jenkins [testenv] setenv = jenkins: FLASK_CONFIG_FILE = wikimedia_config.yaml [testenv:jenkins]
Under Jenkins tox runs test instead of jenkins and FLASK_CONFIG_FILE environment variable is not set which leads to the failure.
Another example is Quibble which has tox environment using whatever python3 version is available while on Jenkins we run against explicit python versions (3.7, 3.8, 3.9):
[tox] envlist = check, py3-lint, black, py3-unit, integration [tox:jenkins] envlist = check, py{37,38,39}-{lint}, black, py{37,38,39}-{unit}, doc