Resort jenkins/jobs/projects.yaml
Sort the file in alphabetical order and update tools/jenkins-projects-checks.py for this sort order. Use single blank line as separator between entries everywhere. Change-Id: I2ff09483191260a9ae5d3460046b50d212ceb1ef
This commit is contained in:
7640
jenkins/jobs/projects.yaml
Executable file → Normal file
7640
jenkins/jobs/projects.yaml
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@@ -22,8 +22,8 @@ def normalize(s):
|
|||||||
return s.lower().replace("_", "-")
|
return s.lower().replace("_", "-")
|
||||||
|
|
||||||
|
|
||||||
def check_sections():
|
def check_alphabetical():
|
||||||
"""Check that the projects are in alphabetical order per section
|
"""Check that the projects are in alphabetical order
|
||||||
and that indenting looks correct"""
|
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
|
||||||
@@ -32,10 +32,6 @@ def check_sections():
|
|||||||
last = ""
|
last = ""
|
||||||
count = 1
|
count = 1
|
||||||
for line in open('jenkins/jobs/projects.yaml', 'r'):
|
for line in open('jenkins/jobs/projects.yaml', 'r'):
|
||||||
if line.startswith('# Section:'):
|
|
||||||
last = ""
|
|
||||||
section = line[10:].strip()
|
|
||||||
print("Checking section '%s'" % section)
|
|
||||||
if line.startswith(' name: '):
|
if line.startswith(' name: '):
|
||||||
i = line.find(' name: ')
|
i = line.find(' name: ')
|
||||||
current = line[i + 7:].strip()
|
current = line[i + 7:].strip()
|
||||||
@@ -55,7 +51,7 @@ def check_sections():
|
|||||||
|
|
||||||
|
|
||||||
def check_all():
|
def check_all():
|
||||||
errors = check_sections()
|
errors = check_alphabetical()
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
print("Found errors in jenkins/jobs/projects.yaml!")
|
print("Found errors in jenkins/jobs/projects.yaml!")
|
||||||
|
Reference in New Issue
Block a user