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'
|
||||
|
||||
- project:
|
||||
name: tripleo-common
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
name: tripleo-common
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
|
||||
- project:
|
||||
name: tripleo-heat-templates
|
||||
@ -4328,12 +4328,12 @@
|
||||
- python-jobs
|
||||
|
||||
- project:
|
||||
name: cloudpulse
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
name: cloudpulse
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
|
||||
- project:
|
||||
name: cloudv-ostf-adapter
|
||||
@ -4788,22 +4788,22 @@
|
||||
- translation-jobs
|
||||
|
||||
- project:
|
||||
name: mercador-pub
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
name: mercador-pub
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
|
||||
- project:
|
||||
name: mercador-sub
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
name: mercador-sub
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
|
||||
- project:
|
||||
name: merlin
|
||||
@ -5417,13 +5417,13 @@
|
||||
envlist: bandit
|
||||
|
||||
- project:
|
||||
name: python-mercadorclient
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
name: python-mercadorclient
|
||||
node: 'bare-precise || bare-trusty'
|
||||
tarball-site: tarballs.openstack.org
|
||||
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
jobs:
|
||||
- python-jobs
|
||||
- pypi-jobs
|
||||
|
||||
- project:
|
||||
name: python-monascaclient
|
||||
|
@ -23,12 +23,14 @@ def normalize(s):
|
||||
|
||||
|
||||
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
|
||||
# entries within these sections only
|
||||
errors = False
|
||||
last = ""
|
||||
count = 1
|
||||
for line in open('jenkins/jobs/projects.yaml', 'r'):
|
||||
if line.startswith('# Section:'):
|
||||
last = ""
|
||||
@ -42,6 +44,13 @@ def check_sections():
|
||||
{"last": last, "current": current})
|
||||
errors = True
|
||||
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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user