summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSorin Sbarnea <ssbarnea@redhat.com>2018-08-03 15:43:37 +0100
committerAndreas Jaeger <aj@suse.com>2018-09-24 08:13:16 +0200
commitdb10400e88d2d684606b43395b940748f6c07612 (patch)
treeeb46f41f922f93f6cf0b0779d78a4c0f9dabdfd6
parent1ab1df6de2b9126f0fd8cbdf808364991eedf70b (diff)
Use python3 for tox linting
fix tox python3 overrides We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Also, add tox-linters job to gate so that changes like this can merge. The files section limit what runs - and if *nothing* run, there's no +2 from CI. Another reason to add this job is that we run voting jobs in both check and gate, and this one was only in check. Change-Id: I742695bfcd071c4930c4170553af7d9a59f6a432
Notes
Notes (review): Code-Review+2: Marios Andreou <marios@redhat.com> Verified-1: RDO Third Party CI <dmsimard+rdothirdparty@redhat.com> Code-Review+1: Chandan Kumar <chkumar@redhat.com> Code-Review+1: Bogdan Dobrelya <bdobreli@redhat.com> Code-Review+2: Alex Schultz <aschultz@redhat.com> Workflow+1: Alex Schultz <aschultz@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 27 Sep 2018 11:58:17 +0000 Reviewed-on: https://review.openstack.org/588587 Project: openstack-infra/tripleo-ci Branch: refs/heads/master
-rw-r--r--tox.ini2
-rw-r--r--zuul.d/layout.yaml5
2 files changed, 6 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 0dfcb44..c67b88f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,10 +11,12 @@ deps = -r{toxinidir}/test-requirements.txt
11commands = {posargs} 11commands = {posargs}
12 12
13[testenv:pyflakes] 13[testenv:pyflakes]
14basepython = python3
14deps = pyflakes 15deps = pyflakes
15commands = pyflakes setup.py scripts 16commands = pyflakes setup.py scripts
16 17
17[testenv:linters] 18[testenv:linters]
19basepython = python3
18whitelist_externals = bash 20whitelist_externals = bash
19commands = flake8 --max-line-length 80 {toxinidir} {posargs} 21commands = flake8 --max-line-length 80 {toxinidir} {posargs}
20 22
diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml
index 575f6ce..5152494 100644
--- a/zuul.d/layout.yaml
+++ b/zuul.d/layout.yaml
@@ -13,13 +13,13 @@
13 - tripleo-multinode-branchful 13 - tripleo-multinode-branchful
14 check: 14 check:
15 jobs: 15 jobs:
16 - openstack-tox-linters
16 - openstack-tox-py27: 17 - openstack-tox-py27:
17 files: 18 files:
18 - ^scripts/emit_releases_file/.*$ 19 - ^scripts/emit_releases_file/.*$
19 - openstack-tox-py35: 20 - openstack-tox-py35:
20 files: 21 files:
21 - ^scripts/emit_releases_file/.*$ 22 - ^scripts/emit_releases_file/.*$
22 - openstack-tox-linters
23 - tripleo-ci-centos-7-scenario001-multinode-oooq: 23 - tripleo-ci-centos-7-scenario001-multinode-oooq:
24 files: 24 files:
25 - ^playbooks/tripleo-ci/.*$ 25 - ^playbooks/tripleo-ci/.*$
@@ -62,6 +62,9 @@
62 gate: 62 gate:
63 queue: tripleo 63 queue: tripleo
64 jobs: 64 jobs:
65 # Don't put a files section on the linters job, otherwise no
66 # jobs might be defined and nothing can merge in this repo.
67 - openstack-tox-linters
65 - openstack-tox-py27: 68 - openstack-tox-py27:
66 files: 69 files:
67 - ^scripts/emit_releases_file/.*$ 70 - ^scripts/emit_releases_file/.*$