add in-repo zuul config
This patch adds the zuul config and tox.ini updates to support in-repo config for zuul v3. Change-Id: I0cf5b5fdef72887c6bd81084937b120d82d4f1a4
This commit is contained in:
parent
2520bbc569
commit
9a2bc89574
|
@ -0,0 +1,5 @@
|
||||||
|
- project:
|
||||||
|
templates:
|
||||||
|
- openstack-python-jobs
|
||||||
|
- openstack-python36-jobs
|
||||||
|
- check-requirements
|
|
@ -0,0 +1,30 @@
|
||||||
|
# This file contains runtime (non-python) dependencies
|
||||||
|
# More info at: http://docs.openstack.org/infra/bindep/readme.html
|
||||||
|
|
||||||
|
# tools/misc-sanity-checks.sh validates .po[t] files
|
||||||
|
gettext [test]
|
||||||
|
|
||||||
|
# cffi (required by oslo.privsep) and PyNaCL (required by paramiko)
|
||||||
|
libffi-dev [platform:dpkg]
|
||||||
|
libffi-devel [platform:rpm]
|
||||||
|
|
||||||
|
# MySQL and PostgreSQL databases since some jobs are set up in
|
||||||
|
# OpenStack infra that need these like
|
||||||
|
# periodic-neutron-py27-with-oslo-master and
|
||||||
|
# periodic-neutron-py35-with-neutron-lib-master.
|
||||||
|
haproxy
|
||||||
|
libmysqlclient-dev [platform:dpkg test]
|
||||||
|
mysql [platform:rpm test]
|
||||||
|
mysql-client [platform:dpkg test]
|
||||||
|
mysql-devel [platform:rpm test]
|
||||||
|
mysql-server [test]
|
||||||
|
postgresql [test]
|
||||||
|
postgresql-client [platform:dpkg test]
|
||||||
|
postgresql-devel [platform:rpm test]
|
||||||
|
postgresql-server [platform:rpm test]
|
||||||
|
|
||||||
|
# Neutron's test-requirements requires tempest which requires paramiko
|
||||||
|
# which requires cryptography which requires ssl.
|
||||||
|
libssl-dev [platform:dpkg]
|
||||||
|
openssl-devel [platform:rpm !platform:suse]
|
||||||
|
libopenssl-devel [platform:suse !platform:rpm]
|
|
@ -2,7 +2,7 @@
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
hacking<0.12,>=0.11.0 # Apache-2.0
|
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||||
|
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
|
|
30
tox.ini
30
tox.ini
|
@ -1,17 +1,16 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py27,pep8,docs
|
envlist = py36,py27,pep8,docs
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?stable/queens} {opts} {packages}
|
install_command = pip install {opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
BRANCH_NAME=master
|
|
||||||
CLIENT_NAME=vmware-nsxlib
|
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/queens}
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
commands =
|
commands =
|
||||||
|
@ -27,7 +26,7 @@ setenv = {[testenv]setenv}
|
||||||
commands = false
|
commands = false
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python2.7
|
basepython = python3
|
||||||
setenv = {[testenv]setenv}
|
setenv = {[testenv]setenv}
|
||||||
{[testenv:common]setenv}
|
{[testenv:common]setenv}
|
||||||
OS_TEST_PATH=./vmware_nsxlib/tests/functional
|
OS_TEST_PATH=./vmware_nsxlib/tests/functional
|
||||||
|
@ -37,7 +36,7 @@ deps =
|
||||||
-r{toxinidir}/vmware_nsxlib/tests/functional/requirements.txt
|
-r{toxinidir}/vmware_nsxlib/tests/functional/requirements.txt
|
||||||
|
|
||||||
[testenv:dsvm-functional]
|
[testenv:dsvm-functional]
|
||||||
basepython = python2.7
|
basepython = python3
|
||||||
setenv = {[testenv]setenv}
|
setenv = {[testenv]setenv}
|
||||||
OS_SUDO_TESTING=1
|
OS_SUDO_TESTING=1
|
||||||
OS_FAIL_ON_MISSING_DEPS=1
|
OS_FAIL_ON_MISSING_DEPS=1
|
||||||
|
@ -54,7 +53,7 @@ sitepackages = True
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python2.7
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
commands =
|
commands =
|
||||||
|
@ -66,10 +65,12 @@ whitelist_externals =
|
||||||
bash
|
bash
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/queens}
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = bandit -r vmware_nsxlib -n 5 -ll
|
commands = bandit -r vmware_nsxlib -n 5 -ll
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
python setup.py test --coverage --coverage-package-name=vmware_nsxlib --testr-args='{posargs}'
|
python setup.py test --coverage --coverage-package-name=vmware_nsxlib --testr-args='{posargs}'
|
||||||
coverage report
|
coverage report
|
||||||
|
@ -78,17 +79,22 @@ commands =
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
basepython = python3
|
||||||
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/queens}
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
commands = sphinx-build -b html doc/source doc/build/html
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E125 continuation line does not distinguish itself from next logical line
|
# E125 continuation line does not distinguish itself from next logical line
|
||||||
# E129 visually indented line with same indent as next logical line
|
# E129 visually indented line with same indent as next logical line
|
||||||
|
# E741 ambiguous variable name
|
||||||
# N530 direct neutron imports not allowed
|
# N530 direct neutron imports not allowed
|
||||||
|
# W504 line break after binary operator
|
||||||
# N531 translations hints
|
# N531 translations hints
|
||||||
ignore = N530,E125,E129,N531
|
ignore = N530,E125,E129,E741,N531,W504
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = build,dist
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject
|
||||||
import-order-style = pep8
|
import-order-style = pep8
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
|
|
|
@ -42,7 +42,7 @@ class NsxLibException(Exception):
|
||||||
|
|
||||||
if six.PY2:
|
if six.PY2:
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return unicode(self.msg)
|
return unicode(self.msg) if six.PY2 else self.msg # noqa
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.msg
|
return self.msg
|
||||||
|
|
Loading…
Reference in New Issue