Adding zuul jobs for new repo
This job adds a single linters tox target. The linters target is an aggregation of linters for this repo including: - bashate - flake8 Other linters such as yamllint can be added to this repo by later commits. Certain flake8 codes are suppressed. They can be enabled by later commits. This commit also adds basic contributing and hacking docs. Change-Id: Ib10d84141954f1d39a258913a98d314763c74824 Story: 2006166 Task: 36544 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
9d5a193c9e
commit
7e19909172
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.tox
|
8
.zuul.yaml
Normal file
8
.zuul.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
16
CONTRIBUTING.rst
Normal file
16
CONTRIBUTING.rst
Normal file
@ -0,0 +1,16 @@
|
||||
If you would like to contribute to the development of OpenStack,
|
||||
you must follow the steps in this page:
|
||||
|
||||
https://docs.openstack.org/infra/manual/developers.html
|
||||
|
||||
Once those steps have been completed, changes to OpenStack
|
||||
should be submitted for review via the Gerrit tool, following
|
||||
the workflow documented at:
|
||||
|
||||
https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs should be filed in Launchpad:
|
||||
|
||||
https://bugs.launchpad.net/starlingx
|
17
HACKING.rst
Normal file
17
HACKING.rst
Normal file
@ -0,0 +1,17 @@
|
||||
StarlingX Monitoring Style Commandments
|
||||
=======================================
|
||||
|
||||
- Step 1: Read the OpenStack style commandments
|
||||
https://docs.openstack.org/hacking/latest/
|
||||
- Step 2: Read on
|
||||
|
||||
Monitoring Specific Commandments
|
||||
--------------------------------
|
||||
|
||||
None so far
|
||||
|
||||
Running tests
|
||||
-------------
|
||||
The approach to running tests is to simply run the command ``tox``. This will
|
||||
create virtual environments, populate them with dependencies and run all of
|
||||
the tests that OpenStack CI systems run.
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
# Nothing
|
3
test-requirements.txt
Normal file
3
test-requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# hacking pulls in flake8
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
bashate >= 0.2
|
55
tox.ini
Normal file
55
tox.ini
Normal file
@ -0,0 +1,55 @@
|
||||
[tox]
|
||||
envlist = linters
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
sitepackages=False
|
||||
|
||||
[testenv]
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_STDOUT_CAPTURE=1
|
||||
OS_STDERR_CAPTURE=1
|
||||
OS_DEBUG=1
|
||||
OS_LOG_CAPTURE=1
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
whitelist_externals =
|
||||
bash
|
||||
|
||||
[testenv:bashate]
|
||||
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
||||
commands =
|
||||
bash -c "find {toxinidir} \
|
||||
-not \( -type d -name .?\* -prune \) \
|
||||
-type f \
|
||||
-not -name \*~ \
|
||||
-not -name \*.md \
|
||||
-name \*.sh \
|
||||
-print0 | xargs -r -n 1 -0 bashate -v \
|
||||
-e 'E*'"
|
||||
|
||||
[flake8]
|
||||
# Note: hacking pulls in flake8 2.5.5 which can not parse an ignore list spanning multiple lines
|
||||
# F errors are high priority to fix. W are warnings. E series are pep8, H series are hacking
|
||||
# F401 'FOO' imported but unused
|
||||
# F841 local variable 'foo' is assigned to but never used
|
||||
# W291 trailing whitespace
|
||||
# E265 block comment should start with '# '
|
||||
# H101 is TODO
|
||||
# H104 File contains nothing but comments
|
||||
# H201 no 'except:' at least use 'except Exception:'
|
||||
# H238 old style class declaration, use new style (inherit from `object`)
|
||||
# H306 imports not in alphabetical order (sys, re)
|
||||
ignore=F401,F841,W291,E265,H101,H104,H201,H238,H306
|
||||
max-line-length=110
|
||||
|
||||
[testenv:flake8]
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:linters]
|
||||
commands =
|
||||
{[testenv:bashate]commands}
|
||||
{[testenv:flake8]commands}
|
Loading…
Reference in New Issue
Block a user