ci: add linting jobs
Change-Id: Id312b11d510caa6becd6113765dc891b929fab05
This commit is contained in:
parent
85a5e972a8
commit
eddb78f48a
@ -26,6 +26,7 @@ parser.add_argument('--master', type=str, required=True,
|
|||||||
parser.add_argument('--minion', type=str, required=True, action='append',
|
parser.add_argument('--minion', type=str, required=True, action='append',
|
||||||
help='minion')
|
help='minion')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -35,4 +36,4 @@ def main():
|
|||||||
cluster_config.minions = args.minion
|
cluster_config.minions = args.minion
|
||||||
|
|
||||||
cluster = ansible.Cluster(config=cluster_config)
|
cluster = ansible.Cluster(config=cluster_config)
|
||||||
cluster.deploy()
|
cluster.deploy()
|
||||||
|
@ -27,8 +27,8 @@ class Cluster(object):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
shutil.copytree('ansible', '%s/project' % private_data_dir)
|
shutil.copytree('ansible', '%s/project' % private_data_dir)
|
||||||
r = ansible_runner.run(private_data_dir=private_data_dir,
|
ansible_runner.run(private_data_dir=private_data_dir,
|
||||||
inventory=self.config.inventory,
|
inventory=self.config.inventory,
|
||||||
playbook='site.yaml')
|
playbook='site.yaml')
|
||||||
finally:
|
finally:
|
||||||
shutil.rmtree(private_data_dir, ignore_errors=True)
|
shutil.rmtree(private_data_dir, ignore_errors=True)
|
||||||
|
2
tox.ini
2
tox.ini
@ -9,9 +9,11 @@ deps =
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
skipsdist = True
|
||||||
commands = {posargs}
|
commands = {posargs}
|
@ -16,9 +16,11 @@
|
|||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
|
- tox-linters
|
||||||
- kue-integration-1-node
|
- kue-integration-1-node
|
||||||
- kue-integration-2-node
|
- kue-integration-2-node
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
|
- tox-linters
|
||||||
- kue-integration-1-node
|
- kue-integration-1-node
|
||||||
- kue-integration-2-node
|
- kue-integration-2-node
|
Loading…
x
Reference in New Issue
Block a user