From eddb78f48a266140c4b9aa9a22c9ef57a5459588 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 23 Aug 2019 14:25:39 -0400 Subject: [PATCH] ci: add linting jobs Change-Id: Id312b11d510caa6becd6113765dc891b929fab05 --- kue/cmd/cli.py | 3 ++- kue/drivers/ansible.py | 6 +++--- tox.ini | 2 ++ zuul.d/project.yaml | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kue/cmd/cli.py b/kue/cmd/cli.py index 99fddb9..7d1bc00 100644 --- a/kue/cmd/cli.py +++ b/kue/cmd/cli.py @@ -26,6 +26,7 @@ parser.add_argument('--master', type=str, required=True, parser.add_argument('--minion', type=str, required=True, action='append', help='minion') + def main(): args = parser.parse_args() @@ -35,4 +36,4 @@ def main(): cluster_config.minions = args.minion cluster = ansible.Cluster(config=cluster_config) - cluster.deploy() \ No newline at end of file + cluster.deploy() diff --git a/kue/drivers/ansible.py b/kue/drivers/ansible.py index e52d8aa..c9060c3 100644 --- a/kue/drivers/ansible.py +++ b/kue/drivers/ansible.py @@ -27,8 +27,8 @@ class Cluster(object): try: shutil.copytree('ansible', '%s/project' % private_data_dir) - r = ansible_runner.run(private_data_dir=private_data_dir, - inventory=self.config.inventory, - playbook='site.yaml') + ansible_runner.run(private_data_dir=private_data_dir, + inventory=self.config.inventory, + playbook='site.yaml') finally: shutil.rmtree(private_data_dir, ignore_errors=True) diff --git a/tox.ini b/tox.ini index 3ab8d7a..b27c2e5 100644 --- a/tox.ini +++ b/tox.ini @@ -9,9 +9,11 @@ deps = -r{toxinidir}/requirements.txt [testenv:linters] +usedevelop = True deps = flake8 commands = flake8 [testenv:venv] +skipsdist = True commands = {posargs} \ No newline at end of file diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index e6f7893..9bdcc10 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -16,9 +16,11 @@ - project: check: jobs: + - tox-linters - kue-integration-1-node - kue-integration-2-node gate: jobs: + - tox-linters - kue-integration-1-node - kue-integration-2-node \ No newline at end of file