Browse Source

Attempting to add zuul jobs to new repo

This job adds a single linters tox target.

The linters target is an aggregation of linters for
this repo.
At present the only linter being invoked is bashate.

Other linters such as yamllint can be added to this
repo by later commits.

Change-Id: Ife7acf5fbbbfcd69a1d7b393ddf7b650e985af2c
Story: 2006166
Task: 36535
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
changes/77/681077/2
Al Bailey 2 years ago
parent
commit
1c6c8e30c5
5 changed files with 45 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +8
    -0
      .zuul.yaml
  3. +1
    -0
      requirements.txt
  4. +2
    -0
      test-requirements.txt
  5. +33
    -0
      tox.ini

+ 1
- 0
.gitignore View File

@ -0,0 +1 @@
.tox

+ 8
- 0
.zuul.yaml View File

@ -0,0 +1,8 @@
---
- project:
check:
jobs:
- openstack-tox-linters
gate:
jobs:
- openstack-tox-linters

+ 1
- 0
requirements.txt View File

@ -0,0 +1 @@
# Nothing

+ 2
- 0
test-requirements.txt View File

@ -0,0 +1,2 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
bashate >= 0.2

+ 33
- 0
tox.ini View File

@ -0,0 +1,33 @@
[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]
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"
[testenv:linters]
commands =
{[testenv:bashate]commands}

Loading…
Cancel
Save