diff --git a/.zuul.yaml b/.zuul.yaml index ba935dd..3651b37 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,13 +3,95 @@ check: jobs: - openstack-tox-linters + - k8sapp-platform-tox-py27 + - k8sapp-platform-tox-py36 + - k8sapp-platform-tox-flake8 + - k8sapp-platform-tox-pylint + - k8sapp-platform-tox-bandit gate: jobs: - openstack-tox-linters + - k8sapp-platform-tox-py27 + - k8sapp-platform-tox-py36 + - k8sapp-platform-tox-flake8 + - k8sapp-platform-tox-pylint + - k8sapp-platform-tox-bandit post: jobs: - stx-platform-armada-app-upload-git-mirror +- job: + name: k8sapp-platform-tox-py27 + parent: tox + description: | + Run py27 test for k8sapp_platform + nodeset: ubuntu-xenial + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + files: + - python-k8sapp-platform/* + vars: + tox_envlist: py27 + tox_extra_args: -c python-k8sapp-platform/k8sapp_platform/tox.ini + +- job: + name: k8sapp-platform-tox-py36 + parent: tox + description: | + Run py36 test for k8sapp_platform + nodeset: ubuntu-bionic + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + files: + - python-k8sapp-platform/* + vars: + tox_envlist: py36 + tox_extra_args: -c python-k8sapp-platform/k8sapp_platform/tox.ini + +- job: + name: k8sapp-platform-tox-flake8 + parent: tox + description: | + Run flake8 test for k8sapp_platform + files: + - python-k8sapp-platform/* + vars: + tox_envlist: flake8 + tox_extra_args: -c python-k8sapp-platform/k8sapp_platform/tox.ini + +- job: + name: k8sapp-platform-tox-pylint + parent: tox + description: | + Run pylint test for k8sapp_platform + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + files: + - python-k8sapp-platform/* + vars: + tox_envlist: pylint + tox_extra_args: -c python-k8sapp-platform/k8sapp_platform/tox.ini + +- job: + name: k8sapp-platform-tox-bandit + parent: tox + description: | + Run bandit test for k8sapp_platform + files: + - python-k8sapp-platform/* + vars: + tox_envlist: bandit + tox_extra_args: -c python-k8sapp-platform/k8sapp_platform/tox.ini + - job: name: stx-platform-armada-app-upload-git-mirror parent: upload-git-mirror diff --git a/python-k8sapp-platform/k8sapp_platform/tox.ini b/python-k8sapp-platform/k8sapp_platform/tox.ini index 1f8e947..6881f9d 100644 --- a/python-k8sapp-platform/k8sapp_platform/tox.ini +++ b/python-k8sapp-platform/k8sapp_platform/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = flake8,py27,py36,pylint +envlist = flake8,py27,py36,pylint,bandit minversion = 1.6 # skipsdist = True #,pip-missing-reqs @@ -21,7 +21,7 @@ sitepackages = True whitelist_externals = bash find -install_command = pip install \ +install_command = pip install --use-deprecated legacy-resolver \ -v -v -v \ -c{toxinidir}/upper-constraints.txt \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ @@ -43,7 +43,6 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - -e{[tox]stxdir}/config/controllerconfig/controllerconfig -e{[tox]stxdir}/config/sysinv/sysinv/sysinv -e{[tox]stxdir}/config/tsconfig/tsconfig -e{[tox]stxdir}/fault/fm-api diff --git a/tox.ini b/tox.ini index cede375..c1ff2ef 100644 --- a/tox.ini +++ b/tox.ini @@ -33,3 +33,15 @@ commands = [testenv:linters] commands = {[testenv:bashate]commands} + +[testenv:flake8] +basepython = python3 +description = Dummy environment to allow flake8 to be run in subdir tox + +[testenv:pylint] +basepython = python3 +description = Dummy environment to allow pylint to be run in subdir tox + +[testenv:bandit] +basepython = python3 +description = Dummy environment to allow bandit to be run in subdir tox