summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonelle Landy <rlandy@redhat.com>2018-05-15 13:41:15 -0400
committerJohn Trowbridge <trown@redhat.com>2018-05-18 10:37:44 -0400
commitdbca28c411ba3a2db704604bf2b1b2048f520248 (patch)
treefc1c30b76dbe2595443fb9435937e7a571363dbd
parent53e40920386f337ee2a1fcca4cfc3ea928836fa2 (diff)
Add linter jobs for releases file script
This review adds a pep8 jobs to be triggered with changes to the releases script files. pylint was considered but removed from this initial review. Change-Id: Ib8809c94d99ccb1ecafa94b3791f613c35dbd9ef
Notes
Notes (review): Code-Review+2: John Trowbridge <trown@redhat.com> Workflow+1: John Trowbridge <trown@redhat.com> Verified-1: RDO Third Party CI <dmsimard+rdothirdparty@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 19 May 2018 00:34:18 +0000 Reviewed-on: https://review.openstack.org/568287 Project: openstack-infra/tripleo-ci Branch: refs/heads/master
-rw-r--r--scripts/emit_releases_file/emit_releases_file.py1
-rw-r--r--scripts/emit_releases_file/test_get_dlrn_hash.py1
-rw-r--r--tox.ini3
-rw-r--r--zuul.d/layout.yaml6
4 files changed, 10 insertions, 1 deletions
diff --git a/scripts/emit_releases_file/emit_releases_file.py b/scripts/emit_releases_file/emit_releases_file.py
index 7efe7a7..f18f417 100644
--- a/scripts/emit_releases_file/emit_releases_file.py
+++ b/scripts/emit_releases_file/emit_releases_file.py
@@ -8,6 +8,7 @@ import yaml
8 8
9# Define releases 9# Define releases
10RELEASES = ['newton', 'ocata', 'pike', 'queens', 'master'] 10RELEASES = ['newton', 'ocata', 'pike', 'queens', 'master']
11# Define long term releases
11LONG_TERM_SUPPORT_RELEASES = ['queens'] 12LONG_TERM_SUPPORT_RELEASES = ['queens']
12 13
13 14
diff --git a/scripts/emit_releases_file/test_get_dlrn_hash.py b/scripts/emit_releases_file/test_get_dlrn_hash.py
index 59a6e37..2525fb1 100644
--- a/scripts/emit_releases_file/test_get_dlrn_hash.py
+++ b/scripts/emit_releases_file/test_get_dlrn_hash.py
@@ -3,6 +3,7 @@ from emit_releases_file import get_dlrn_hash
3import mock 3import mock
4import pytest 4import pytest
5 5
6
6@mock.patch('requests.get') 7@mock.patch('requests.get')
7def test_get_dlrn_hash(mock_get): 8def test_get_dlrn_hash(mock_get):
8 mock_response = mock.Mock() 9 mock_response = mock.Mock()
diff --git a/tox.ini b/tox.ini
index d4daa14..1f561f2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,8 +15,9 @@ deps = pyflakes
15commands = pyflakes setup.py scripts 15commands = pyflakes setup.py scripts
16 16
17[testenv:pep8] 17[testenv:pep8]
18changedir = scripts/emit_releases_file
18whitelist_externals = bash 19whitelist_externals = bash
19commands = flake8 20commands = flake8 --max-line-length 80
20 21
21[testenv:cireport] 22[testenv:cireport]
22passenv = 23passenv =
diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml
index 176bf3c..dd4762c 100644
--- a/zuul.d/layout.yaml
+++ b/zuul.d/layout.yaml
@@ -18,6 +18,9 @@
18 - openstack-tox-py35: 18 - openstack-tox-py35:
19 files: 19 files:
20 - ^scripts/emit_releases_file/.*$ 20 - ^scripts/emit_releases_file/.*$
21 - openstack-tox-pep8:
22 files:
23 - ^scripts/emit_releases_file/.*$
21 gate: 24 gate:
22 queue: tripleo 25 queue: tripleo
23 jobs: 26 jobs:
@@ -27,3 +30,6 @@
27 - openstack-tox-py35: 30 - openstack-tox-py35:
28 files: 31 files:
29 - ^scripts/emit_releases_file/.*$ 32 - ^scripts/emit_releases_file/.*$
33 - openstack-tox-pep8:
34 files:
35 - ^scripts/emit_releases_file/.*$