Enable pep8 and pylint in zuul for cgts-client
The zuul config file was not triggering correctly. cgts-client changes should run jobs for cgts-client sysinv changes should run jobs for sysinv pep8 / flake8 jobs do not need dependent projects This change also fixes the failing pep8 and pylint errors The change in sysinv/tox.ini was to verify the zuul jobs for sysinv are triggered by a change under that folder. Story: 2003862 Task: 27870 Change-Id: Ia5887ef74fc0628e0dcf55f1f27cf0dc9e5ccbc7 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
54fdc72026
commit
1eb9e76426
43
.zuul.yaml
43
.zuul.yaml
|
@ -16,6 +16,8 @@
|
||||||
- stx-devstack-config:
|
- stx-devstack-config:
|
||||||
voting: false
|
voting: false
|
||||||
- cgtsclient-tox-py27
|
- cgtsclient-tox-py27
|
||||||
|
- cgtsclient-tox-pep8
|
||||||
|
- cgtsclient-tox-pylint
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- build-openstack-api-ref
|
- build-openstack-api-ref
|
||||||
|
@ -28,6 +30,8 @@
|
||||||
- controllerconfig-tox-pylint
|
- controllerconfig-tox-pylint
|
||||||
- configutilities-tox-flake8
|
- configutilities-tox-flake8
|
||||||
- cgtsclient-tox-py27
|
- cgtsclient-tox-py27
|
||||||
|
- cgtsclient-tox-pep8
|
||||||
|
- cgtsclient-tox-pylint
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- publish-stx-api-ref
|
- publish-stx-api-ref
|
||||||
|
@ -44,7 +48,7 @@
|
||||||
- openstack/stx-fault
|
- openstack/stx-fault
|
||||||
- openstack/stx-integ
|
- openstack/stx-integ
|
||||||
files:
|
files:
|
||||||
- sysinv/*
|
- sysinv/sysinv/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: py27
|
tox_envlist: py27
|
||||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||||
|
@ -54,12 +58,8 @@
|
||||||
parent: tox
|
parent: tox
|
||||||
description: |
|
description: |
|
||||||
Run flake8 test for sysinv
|
Run flake8 test for sysinv
|
||||||
required-projects:
|
|
||||||
- openstack/stx-update
|
|
||||||
- openstack/stx-fault
|
|
||||||
- openstack/stx-integ
|
|
||||||
files:
|
files:
|
||||||
- sysinv/*
|
- sysinv/sysinv/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: flake8
|
tox_envlist: flake8
|
||||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||||
|
@ -68,9 +68,6 @@
|
||||||
name: controllerconfig-tox-flake8
|
name: controllerconfig-tox-flake8
|
||||||
parent: tox
|
parent: tox
|
||||||
description: Run flake8 tests for controllerconfig
|
description: Run flake8 tests for controllerconfig
|
||||||
required-projects:
|
|
||||||
- openstack/stx-update
|
|
||||||
- openstack/stx-fault
|
|
||||||
files:
|
files:
|
||||||
- controllerconfig/*
|
- controllerconfig/*
|
||||||
vars:
|
vars:
|
||||||
|
@ -149,7 +146,7 @@
|
||||||
description: |
|
description: |
|
||||||
Run py27 test for cgts-client
|
Run py27 test for cgts-client
|
||||||
files:
|
files:
|
||||||
- sysinv/*
|
- sysinv/cgts-client/*
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/stx-update
|
- openstack/stx-update
|
||||||
- openstack/stx-fault
|
- openstack/stx-fault
|
||||||
|
@ -157,3 +154,29 @@
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: py27
|
tox_envlist: py27
|
||||||
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: cgtsclient-tox-pep8
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run pep8 test for cgts-client
|
||||||
|
files:
|
||||||
|
- sysinv/cgts-client/*
|
||||||
|
vars:
|
||||||
|
tox_envlist: pep8
|
||||||
|
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: cgtsclient-tox-pylint
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run pylint test for cgts-client
|
||||||
|
files:
|
||||||
|
- sysinv/cgts-client/*
|
||||||
|
required-projects:
|
||||||
|
- openstack/stx-update
|
||||||
|
- openstack/stx-fault
|
||||||
|
- openstack/stx-integ
|
||||||
|
vars:
|
||||||
|
tox_envlist: pylint
|
||||||
|
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Manager(object):
|
||||||
def _create(self, url, body):
|
def _create(self, url, body):
|
||||||
_, body = self.api.json_request('POST', url, body=body)
|
_, body = self.api.json_request('POST', url, body=body)
|
||||||
if body:
|
if body:
|
||||||
return self.resource_class(self, body) # noqa
|
return self.resource_class(self, body) # noqa pylint: disable=not-callable
|
||||||
|
|
||||||
def _upload(self, url, body, data=None):
|
def _upload(self, url, body, data=None):
|
||||||
resp = self.api.upload_request_with_data(
|
resp = self.api.upload_request_with_data(
|
||||||
|
@ -84,7 +84,7 @@ class Manager(object):
|
||||||
_, body = self.api.json_request(http_method, url, body=body)
|
_, body = self.api.json_request(http_method, url, body=body)
|
||||||
# PATCH/PUT requests may not return a body
|
# PATCH/PUT requests may not return a body
|
||||||
if body:
|
if body:
|
||||||
return self.resource_class(self, body) # noqa
|
return self.resource_class(self, body) # noqa pylint: disable=not-callable
|
||||||
|
|
||||||
def _delete(self, url):
|
def _delete(self, url):
|
||||||
self.api.raw_request('DELETE', url)
|
self.api.raw_request('DELETE', url)
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import six
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
import six
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,10 @@ setenv = VIRTUAL_ENV={envdir}
|
||||||
TESTR_START_DIR=cgtsclient/tests
|
TESTR_START_DIR=cgtsclient/tests
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -U {[tox]wrdeps} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
{[tox]wrdeps}
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||||
|
@ -32,6 +33,7 @@ whitelist_externals =
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
flake8 cgtsclient
|
flake8 cgtsclient
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ distshare={toxworkdir}/.tox/distshare
|
||||||
# enabling usedevelop results in py27 develop-inst:
|
# enabling usedevelop results in py27 develop-inst:
|
||||||
# Exception: Versioning for this project requires either an sdist tarball,
|
# Exception: Versioning for this project requires either an sdist tarball,
|
||||||
# or access to an upstream git repository.
|
# or access to an upstream git repository.
|
||||||
# WRS Note. site-packages is true and rpm-python must be yum installed on your dev machine.
|
# Note. site-packages is true and rpm-python must be yum installed on your dev machine.
|
||||||
sitepackages = True
|
sitepackages = True
|
||||||
|
|
||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
|
|
Loading…
Reference in New Issue