Modernise tox.ini and run OSA metal jobs in CI

There was no coverage of an actual OSA deployment in CI, so we
add this. Also remove the legacy python3 functional test
and move all tox environments to be python3.

Change-Id: I36cee01b9a14adf1840d35c3a8934de8a994f399
This commit is contained in:
Jonathan Rosser 2020-06-16 12:05:51 +01:00
parent 170e46b44d
commit 802cafb7fd
2 changed files with 9 additions and 29 deletions

35
tox.ini
View File

@ -1,13 +1,12 @@
[tox] [tox]
minversion = 2.0 minversion = 3.1
skipsdist = True skipsdist = True
envlist = docs,linters,functional,func_py3 envlist = docs,linters,functional
ignore_basepython_conflict = True
[testenv] [testenv]
usedevelop = True usedevelop = True
install_command = basepython = python3
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
commands = commands =
/usr/bin/find . -type f -name "*.pyc" -delete /usr/bin/find . -type f -name "*.pyc" -delete
passenv = passenv =
@ -36,8 +35,9 @@ setenv =
[testenv:docs] [testenv:docs]
basepython = python3 deps =
deps = -r{toxinidir}/doc/requirements.txt -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = commands =
bash -c "rm -rf doc/build" bash -c "rm -rf doc/build"
doc8 doc doc8 doc
@ -45,7 +45,6 @@ commands =
[testenv:pdf-docs] [testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
whitelist_externals = whitelist_externals =
make make
@ -60,21 +59,18 @@ extensions = .rst
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3 deps = {[testenv:docs]deps}
deps = -r{toxinidir}/doc/requirements.txt
commands = commands =
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
# environment used by the -infra templated docs job # environment used by the -infra templated docs job
[testenv:venv] [testenv:venv]
basepython = python3
commands = commands =
{posargs} {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = commands =
bash -c "{toxinidir}/tests/common/test-pep8.sh" bash -c "{toxinidir}/tests/common/test-pep8.sh"
@ -85,38 +81,23 @@ commands =
# unable to detect undefined names # unable to detect undefined names
ignore=F403 ignore=F403
[testenv:bashate] [testenv:bashate]
basepython = python3
commands = commands =
bash -c "{toxinidir}/tests/common/test-bashate.sh" bash -c "{toxinidir}/tests/common/test-bashate.sh"
[testenv:ansible-syntax] [testenv:ansible-syntax]
basepython = python3
commands = commands =
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh" bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
[testenv:ansible-lint] [testenv:ansible-lint]
basepython = python3
commands = commands =
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh" bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
[testenv:functional] [testenv:functional]
commands = commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:func_py3]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters] [testenv:linters]
basepython = python3
commands = commands =
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh" bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
{[testenv:pep8]commands} {[testenv:pep8]commands}

View File

@ -15,17 +15,16 @@
- project: - project:
templates: templates:
- openstack-ansible-role-jobs - openstack-ansible-role-jobs
- openstack-ansible-deploy-aio_metal-jobs
- check-requirements - check-requirements
- publish-openstack-docs-pti - publish-openstack-docs-pti
- publish-to-pypi - publish-to-pypi
- release-notes-jobs-python3 - release-notes-jobs-python3
check: check:
jobs: jobs:
- openstack-ansible-python3-ubuntu-bionic
- tripleo-ci-centos-8-standalone - tripleo-ci-centos-8-standalone
gate: gate:
jobs: jobs:
- openstack-ansible-python3-ubuntu-bionic
- tripleo-ci-centos-8-standalone - tripleo-ci-centos-8-standalone
post: post:
jobs: jobs: