query_data = (curr_info_project_id,)
curr_build_project_id = buildmonitor_db.get_value_from_query_data(query, query_data)
+ # Skip updating the fail status if Base project
+ if 'Base' in project:
+ sr_stage_status = 'S'
+ print '[%s] This is [Base] project!! skip updating the fail status\n' % (__file__)
+ else:
+ sr_stage_status = 'F'
+
### [PRE_SNAP] stage end : update fail status [pre] snapshot creation
info_stage_id = PRE_SNAP
query = "UPDATE sr_stage SET stage_status = %s WHERE sr_status_id = %s " \
"AND info_stage_id = %s AND build_project_id = %s"
- query_data = ('F', curr_sr_status_id, info_stage_id, curr_build_project_id)
+ query_data = (sr_stage_status, curr_sr_status_id, info_stage_id, curr_build_project_id)
buildmonitor_db.do_query(query, query_data)
def start_pre_create_snapshot_for_sr_stage(project, bm_git_tag, bm_start_datetime, bBuildFail):
bm_snapshot_url = content.get("bm_snapshot_url")
bm_snapshot_num = content.get("bm_snapshot_num")
+ # Skip [Pre_Snap_End] if Base project
+ if 'Base' in project:
+ print '[%s] This is [Base] project!! skip [Pre_Snap_End]\n' % (__file__)
+ return
+
# func call
if bm_stage == 'Pre_Snap_End':
print '[%s][Pre_Snap_End]\n' % (__file__)
#buildmonitor.update_fail_status_for_sr_stage(project, bm_git_tag)
bm_stage = 'Pre_Snap_Fail'
bm_data = {"bm_stage" : bm_stage,
+ "project" : project,
"bm_git_tag" : bm_git_tag,
}
trigger_next("BUILD-MONITOR-4-%s" % bm_stage, bm_data)
"bm_start_datetime": str(bm_start_datetime),
"bBuildFail": bBuildFail,
"unresolvable_broken_packages": get_unresolvable_broken_packages(unresolvable_broken_failed_status)
- }
+ }
trigger_next("BUILD-MONITOR-1-%s" % bm_stage, bm_data)
# cleanup src.rpm files on Live repo
"bm_snapshot_name" : bm_snapshot_name,
"bm_snapshot_url" : bm_snapshot_url,
"bm_snapshot_num" : bm_snapshot_num,
- }
+ }
trigger_next("BUILD-MONITOR_%s" % bm_stage, bm_data)
if __name__ == '__main__':