
- uplifted some python modules - fixed tox4 requirements - added focal build node as a default one - added bindep.txt and bindep role to playbooks and docker image build process - changes Makefile to reflect GoLang and dependency management changes - upgraded Helm to v3 for chart build process - uplifted postgresql version to 14.6 - fixed deprecated falcon.API - replaced with falcon.APP - fixed upstream docker image publishing process Change-Id: I307d72bb7680f6f5c71e42ad30666cf786420460
99 lines
2.7 KiB
INI
99 lines
2.7 KiB
INI
[tox]
|
|
envlist = py38,pep8,bandit
|
|
setupdir=python/
|
|
|
|
|
|
[testenv]
|
|
setenv = YAMLDIR = {toxinidir}/python/tests/yaml_samples/
|
|
passenv = http_proxy,HTTP_PROXY,https_proxy,HTTPS_PROXY,no_proxy,NO_PROXY
|
|
deps=
|
|
-r{toxinidir}/python/requirements-lock.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:freeze]
|
|
recreate = True
|
|
allowlist_externals=
|
|
rm
|
|
sh
|
|
pipdeptree
|
|
deps=
|
|
-rpython/requirements-direct.txt
|
|
-rpython/requirements-test.txt
|
|
commands=
|
|
rm -f python/requirements-lock.txt
|
|
sh -c "pip freeze --all | grep -vE 'drydock-provisioner|pyinotify|pkg-resources==0.0.0' > python/requirements-lock.txt"
|
|
sh -c "pipdeptree > python/requirements-tree.txt"
|
|
|
|
[testenv:yapf]
|
|
allowlist_externals=find
|
|
commands=
|
|
yapf -i -r --style=pep8 {toxinidir}/python/setup.py
|
|
yapf -i -r --style=pep8 {toxinidir}/alembic
|
|
yapf -i -r --style=pep8 {toxinidir}/python/drydock_provisioner
|
|
yapf -i -r --style=pep8 {toxinidir}/python/tests
|
|
find {toxinidir}/python/drydock_provisioner -name '__init__.py' -exec yapf -i --style=pep8 \{\} ;
|
|
|
|
[testenv:py38]
|
|
usedevelop=True
|
|
setenv=
|
|
PYTHONWARNING=all
|
|
YAMLDIR={toxinidir}/python/tests/yaml_samples/
|
|
commands=
|
|
py.test \
|
|
--cov=drydock_provisioner \
|
|
{toxinidir}/python/tests/unit/{posargs}
|
|
|
|
[testenv:integration]
|
|
passenv=DOCKER_REGISTRY,IMAGE_NAME,IMAGE_PREFIX,IMAGE_TAG
|
|
setenv=
|
|
PYTHONWARNING=all
|
|
YAMLDIR={toxinidir}/python/tests/yaml_samples/
|
|
commands=
|
|
{toxinidir}/python/tests/postgres/start_postgres.sh
|
|
py.test \
|
|
{toxinidir}/python/tests/integration/postgres/{posargs}
|
|
|
|
[testenv:cover]
|
|
usedevelop=True
|
|
passenv=DOCKER_REGISTRY,IMAGE_NAME,IMAGE_PREFIX,IMAGE_TAG
|
|
setenv=
|
|
YAMLDIR={toxinidir}/python/tests/yaml_samples/
|
|
commands=
|
|
{toxinidir}/python/tests/postgres/start_postgres.sh
|
|
py.test --cov=drydock_provisioner \
|
|
{toxinidir}/python/tests/unit/ {toxinidir}/python/tests/integration/postgres
|
|
|
|
[testenv:genconfig]
|
|
allowlist_externals=tee
|
|
sh
|
|
commands = sh -c 'oslo-config-generator --config-file=etc/drydock/drydock-config-generator.conf | tee etc/drydock/drydock.conf.sample doc/source/_static/drydock.conf.sample'
|
|
|
|
[testenv:genpolicy]
|
|
allowlist_externals=tee
|
|
sh
|
|
commands = sh -c 'oslopolicy-sample-generator --config-file etc/drydock/drydock-policy-generator.conf | tee etc/drydock/policy.yaml.sample doc/source/_static/policy.yaml.sample'
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 \
|
|
{posargs}
|
|
|
|
[testenv:bandit]
|
|
commands = bandit -r drydock_provisioner -n 5
|
|
|
|
[flake8]
|
|
ignore=E302,H306,H304,W503,E251,E126
|
|
exclude= venv,.venv,.git,.idea,.tox,*.egg-info,*.eggs,bin,dist,./build/,alembic/
|
|
max-line-length=119
|
|
|
|
[testenv:docs]
|
|
deps=
|
|
-rdoc/requirements-doc.txt
|
|
-epython
|
|
allowlist_externals=rm
|
|
recreate=true
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -b html doc/source doc/build/html
|