Added check for compatibility jjb jobs and layout
We need to check if there no extra jobs in jjb Change-Id: Ide20b781ced77d6b0c101dac9a78cb457dbb776d
This commit is contained in:
parent
12406b419d
commit
43b0c732c0
config/zuul
host-scripts
jenkins_job_builder
@ -94,8 +94,11 @@ projects:
|
||||
- gate-sahara_tests-mapr_5.2.0.mrv2-u14
|
||||
- gate-sahara_tests-cdh_5.5.0-u14-aio
|
||||
- gate-sahara_tests-cdh_5.5.0-c7-aio
|
||||
- gate-sahara_tests-cdh_5.7.0-c7-aio
|
||||
- gate-sahara_tests-cdh_5.7.0-u14-aio
|
||||
- gate-sahara_tests-ambari_2.3-c7
|
||||
- gate-sahara_tests-ambari_2.4-c7
|
||||
- gate-sahara_tests-ambari_2.4-u14
|
||||
- gate-sahara_tests-cdh_5.5.0-u14-mitaka
|
||||
- gate-sahara_tests-cdh_5.5.0-c7-mitaka
|
||||
- gate-sahara_tests-spark_1.3.1-u14-mitaka
|
||||
@ -134,6 +137,7 @@ projects:
|
||||
- dib-cdh_5.5.0-u14-aio
|
||||
- dib-cdh_5.5.0-c7-aio
|
||||
- dib-cdh_5.7.0-c7-aio
|
||||
- dib-cdh_5.7.0-u14-aio
|
||||
- dib-storm_1.0.1-u14-aio
|
||||
- dib-ambari_2.2-c7
|
||||
- dib-ambari_2.2-u14
|
||||
|
@ -8,6 +8,15 @@ import yaml
|
||||
|
||||
layout = yaml.load(open(sys.argv[1]))
|
||||
|
||||
JENKINS_JOBS = [
|
||||
'update-pool',
|
||||
'daily-log-publisher-43',
|
||||
'integration-cleanup',
|
||||
'jobs-updater',
|
||||
'daily-log-publisher-42',
|
||||
'update-config'
|
||||
]
|
||||
|
||||
|
||||
def grep(source, pattern):
|
||||
found = False
|
||||
@ -40,15 +49,26 @@ def check_jobs():
|
||||
with open(job_list_file, 'r') as f:
|
||||
job_list = [line.rstrip() for line in f]
|
||||
|
||||
zuul_jobs = []
|
||||
|
||||
for project in layout['projects']:
|
||||
for pipeline in pipelines:
|
||||
jobs = project.get(pipeline, [])
|
||||
for job in jobs:
|
||||
zuul_jobs.append(job)
|
||||
found = grep(job_list, job)
|
||||
if not found:
|
||||
print ("Regex %s has no matches in job list" % job)
|
||||
errors = True
|
||||
|
||||
for job in JENKINS_JOBS:
|
||||
job_list.remove(job)
|
||||
|
||||
for job in job_list[1:]:
|
||||
if job not in zuul_jobs:
|
||||
print ("Job %s has no matches in zuul layout" % job)
|
||||
errors = True
|
||||
|
||||
return errors
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -7,3 +7,4 @@ jenkins-jobs test -o out/ $WORKSPACE/jenkins_job_builder/
|
||||
find out/ -printf "%f\n" > job-list.txt
|
||||
|
||||
python $WORKSPACE/host-scripts/check_layout.py $WORKSPACE/config/zuul/layout.yaml job-list.txt
|
||||
rm -rf out job-list.txt
|
||||
|
@ -38,18 +38,12 @@
|
||||
|
||||
jobs:
|
||||
- 'dib-{plugin}-{os}'
|
||||
- 'dib-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.4.0
|
||||
os:
|
||||
- u12
|
||||
- 'dib-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.5.0
|
||||
- cdh_5.7.0
|
||||
- 'dib-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- spark_1.3.1
|
||||
- spark_1.6.0
|
||||
- storm_1.0.1
|
||||
os: u14
|
||||
|
@ -59,17 +59,19 @@
|
||||
- ambari_2.3
|
||||
os:
|
||||
- c7
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.4.0
|
||||
os:
|
||||
- c6.6
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}':
|
||||
plugin:
|
||||
- vanilla_2.7.1
|
||||
- mapr_5.1.0.mrv2
|
||||
- mapr_5.2.0.mrv2
|
||||
os: u14
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.4.0
|
||||
os:
|
||||
- c6.6
|
||||
project_name:
|
||||
- sahara
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.5.0
|
||||
@ -117,27 +119,24 @@
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}':
|
||||
plugin:
|
||||
- vanilla_2.7.1
|
||||
- mapr_5.1.0.mrv2
|
||||
- mapr_5.2.0.mrv2
|
||||
os: u14
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- spark_1.3.1
|
||||
- spark_1.6.0
|
||||
- storm_1.0.1
|
||||
os: u14
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}-aio':
|
||||
plugin:
|
||||
- cdh_5.5.0
|
||||
os:
|
||||
- u14
|
||||
- c7
|
||||
- u14
|
||||
- '{pipeline}-{project_name}-{plugin}-{os}':
|
||||
plugin:
|
||||
- ambari_2.4
|
||||
- ambari_2.3
|
||||
os:
|
||||
- c7
|
||||
- u14
|
||||
- '{pipeline}-sahara_tests-{plugin}-{os}-{release}':
|
||||
plugin:
|
||||
- cdh_5.4.0
|
||||
@ -158,17 +157,6 @@
|
||||
- cdh_5.5.0
|
||||
os:
|
||||
- u14
|
||||
- c7
|
||||
release: mitaka
|
||||
- '{pipeline}-sahara_tests-{plugin}-{os}-{release}':
|
||||
plugin:
|
||||
- spark_1.6.0
|
||||
os: u14
|
||||
release: mitaka
|
||||
- '{pipeline}-sahara_tests-{plugin}-{os}-{release}':
|
||||
plugin:
|
||||
- ambari_2.3
|
||||
os: c7
|
||||
release: mitaka
|
||||
|
||||
- job:
|
||||
|
Loading…
x
Reference in New Issue
Block a user