print 'rm %s' % (os.path.join(root, filename))
os.remove(os.path.join(root, filename))
+def check_build_fail(unresolvable_broken_failed_status):
+ for repo in unresolvable_broken_failed_status:
+ for arch in unresolvable_broken_failed_status[repo]:
+ for p in unresolvable_broken_failed_status[repo][arch]:
+ if p[-10:] != "_aggregate":
+ return True
+ return False
+
+def get_unresolvable_broken_packages(unresolvable_broken_failed_status):
+ unresolvable_broken_packages = {}
+
+ for repo in unresolvable_broken_failed_status:
+ unresolvable_broken_packages[repo] = {}
+ for arch in unresolvable_broken_failed_status[repo]:
+ unresolvable_broken_packages[repo][arch] = {}
+ for p in unresolvable_broken_failed_status[repo][arch]:
+ if unresolvable_broken_failed_status[repo][arch][p] in ("unresolvable", "broken"):
+ unresolvable_broken_packages[repo][arch][p] = unresolvable_broken_failed_status[repo][arch][p]
+
+ return unresolvable_broken_packages
+
def main(action):
"""Script entry point.
Parameters:
print 'buildstatus=%s' %(buildstatus)
build.update_buildstatus(buildstatus,project)
global bBuildFail
- bBuildFail = False
- for item in buildstatus['buildstatus']:
- if item['code'] != 'succeeded':
- print '\n**FATAL: Build not successful. Skip creating images.'
- bBuildFail = True; break
+
+ unresolvable_broken_failed_status = build.get_package_build_result(project, ("unresolvable", "broken", "failed"))
+ bBuildFail = check_build_fail(unresolvable_broken_failed_status)
if buildmonitor_enabled:
bm_git_tag = info['git_tag']
"bm_git_tag" : bm_git_tag,
"bm_start_datetime": str(bm_start_datetime),
"bBuildFail": bBuildFail,
- "unresolvable_broken_packages": build.get_package_build_result(project, ["unresolvable", "broken"])
+ "unresolvable_broken_packages": get_unresolvable_broken_packages(unresolvable_broken_failed_status)
}
trigger_next("BUILD-MONITOR-1-%s" % bm_stage, bm_data)