Check indenting of jenkins/jobs/projects.yaml
I just noticed when reviewing the file that a couple of indents were off. This isn't major, but we can catch that pretty easily with the existing jenkins-projects-checks.py. Change-Id: I92ffda01a2e766954c18fe795862186863f8182f
This commit is contained in:
parent
219db9c669
commit
b472603903
@ -2720,13 +2720,13 @@
|
|||||||
- 'static-{name}-publish'
|
- 'static-{name}-publish'
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: tripleo-common
|
name: tripleo-common
|
||||||
node: 'bare-precise || bare-trusty'
|
node: 'bare-precise || bare-trusty'
|
||||||
tarball-site: tarballs.openstack.org
|
tarball-site: tarballs.openstack.org
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
- pypi-jobs
|
- pypi-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: tripleo-heat-templates
|
name: tripleo-heat-templates
|
||||||
@ -4328,12 +4328,12 @@
|
|||||||
- python-jobs
|
- python-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: cloudpulse
|
name: cloudpulse
|
||||||
node: 'bare-precise || bare-trusty'
|
node: 'bare-precise || bare-trusty'
|
||||||
tarball-site: tarballs.openstack.org
|
tarball-site: tarballs.openstack.org
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
- pypi-jobs
|
- pypi-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: cloudv-ostf-adapter
|
name: cloudv-ostf-adapter
|
||||||
@ -4788,22 +4788,22 @@
|
|||||||
- translation-jobs
|
- translation-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: mercador-pub
|
name: mercador-pub
|
||||||
node: 'bare-precise || bare-trusty'
|
node: 'bare-precise || bare-trusty'
|
||||||
tarball-site: tarballs.openstack.org
|
tarball-site: tarballs.openstack.org
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
- pypi-jobs
|
- pypi-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: mercador-sub
|
name: mercador-sub
|
||||||
node: 'bare-precise || bare-trusty'
|
node: 'bare-precise || bare-trusty'
|
||||||
tarball-site: tarballs.openstack.org
|
tarball-site: tarballs.openstack.org
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
- pypi-jobs
|
- pypi-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: merlin
|
name: merlin
|
||||||
@ -5417,13 +5417,13 @@
|
|||||||
envlist: bandit
|
envlist: bandit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: python-mercadorclient
|
name: python-mercadorclient
|
||||||
node: 'bare-precise || bare-trusty'
|
node: 'bare-precise || bare-trusty'
|
||||||
tarball-site: tarballs.openstack.org
|
tarball-site: tarballs.openstack.org
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
- pypi-jobs
|
- pypi-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: python-monascaclient
|
name: python-monascaclient
|
||||||
|
@ -23,12 +23,14 @@ def normalize(s):
|
|||||||
|
|
||||||
|
|
||||||
def check_sections():
|
def check_sections():
|
||||||
"""Check that the projects are in alphabetical order per section."""
|
"""Check that the projects are in alphabetical order per section
|
||||||
|
and that indenting looks correct"""
|
||||||
|
|
||||||
# Note that the file has different sections and we need to check
|
# Note that the file has different sections and we need to check
|
||||||
# entries within these sections only
|
# entries within these sections only
|
||||||
errors = False
|
errors = False
|
||||||
last = ""
|
last = ""
|
||||||
|
count = 1
|
||||||
for line in open('jenkins/jobs/projects.yaml', 'r'):
|
for line in open('jenkins/jobs/projects.yaml', 'r'):
|
||||||
if line.startswith('# Section:'):
|
if line.startswith('# Section:'):
|
||||||
last = ""
|
last = ""
|
||||||
@ -42,6 +44,13 @@ def check_sections():
|
|||||||
{"last": last, "current": current})
|
{"last": last, "current": current})
|
||||||
errors = True
|
errors = True
|
||||||
last = current
|
last = current
|
||||||
|
if (len(line) - len(line.lstrip(' '))) % 2 != 0:
|
||||||
|
print("Line %(count)s not indented by multiple of 2:\n\t%(line)s" %
|
||||||
|
{"count": count, "line": line})
|
||||||
|
errors = True
|
||||||
|
|
||||||
|
count = count+1
|
||||||
|
|
||||||
return errors
|
return errors
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user