def bm_disconnect_db():
buildmonitor_db.disconnect_db()
-
#===============================================================================
# [job_submit.py]
def end_create_image_for_sr_stage(bm_start_datetime, project):
print '[%s] enter end_create_image_for_sr_stage project(%s)\n' % (__file__, project)
+ bm_end_datetime = datetime.datetime.now()
+
#if project.startswith("home:prerelease:"):
if project.startswith("home:prerelease:") or project.startswith("home:trbs:"):
- bm_end_datetime = datetime.datetime.now()
bm_git_tag = project.split(":")[-3] + '/' + project.split(":")[-2] + '/' + project.split(":")[-1]
#print '[%s] bm_git_tag(%s)\n' % (__file__, bm_git_tag)
query = "UPDATE sr_stage SET stage_end_time = %s, stage_status = %s " \
"WHERE sr_status_id = %s AND info_stage_id = %s AND build_project_id = %s"
query_data = (bm_end_datetime, 'S',
- each_sr_status_id, info_stage_id, curr_build_project_id)
+ each_sr_status_id[0], info_stage_id, curr_build_project_id)
buildmonitor_db.do_query(query, query_data)
info_stage_id = POST_IMAGE
query = "UPDATE sr_stage SET stage_end_time = %s, stage_status = %s " \
"WHERE sr_status_id = %s AND info_stage_id = %s AND build_project_id = %s"
query_data = (bm_end_datetime, 'S',
- each_sr_status_id, info_stage_id, curr_build_project_id)
+ each_sr_status_id[0], info_stage_id, curr_build_project_id)
buildmonitor_db.do_query(query, query_data)
#===============================================================================
# [job_request.py]
}
trigger_next("BUILD-MONITOR-4-%s" % bm_stage, bm_data)
+ # To check the completion of image-creation stage at Post-release
+ #buildmonitor.end_create_image_for_sr_stage(bm_start_datetime,
+ # project)
+ bm_stage = 'Post_Image'
+ bm_data = {"bm_stage" : bm_stage,
+ "bm_start_datetime" : str(bm_start_datetime),
+ "project" : project,
+ }
+ trigger_next("BUILD-MONITOR-POST", bm_data)
+
if __name__ == '__main__':
try:
sys.exit(main())