query = "SELECT id FROM info_project WHERE project_name = %s"
query_data = (bm_src_project,)
info_project_id = buildmonitor_db.get_value_from_query_data(query, query_data)
+ ###================== [16_1110][TEMP] build_project
+ print '[%s][HSH] TEMP!!\n' % (__file__)
+ query = "INSERT INTO build_project (info_project_id, status) VALUES(%s, %s)"
+ query_data = (info_project_id, 'C')
+ buildmonitor_db.do_query(query, query_data)
+ ###================== [16_1110][TEMP] build_project
query = "SELECT id FROM build_project WHERE info_project_id = %s"
query_data = (info_project_id,)
pre_build_project_id = buildmonitor_db.get_value_from_query_data(query, query_data)
buildmonitor_db.do_query(query, query_data)
def create_image_for_build_image(fields, bm_start_datetime,
- bm_end_datetime, build_id):
+ bm_end_datetime, build_id, bm_img_size):
print '[%s] enter create_image_for_build_image\n' % (__file__)
bm_repository = fields['repo']
#print '[%s] bm_repository(%s), bm_device_name(%s), bm_status(%s), bm_url(%s)\n' \
# % (__file__, bm_repository, bm_device_name, bm_status, bm_url)
- bm_base_path = os.getenv('PATH_REPO_BASE')
- bm_img_url = os.path.join(bm_base_path, fields['repo_path'], fields['images_path'])
- bm_img_path = bm_img_url + '/' + build_id + '_' + bm_device_name + '.tar.gz'
- bm_img_size = os.path.getsize(bm_img_path)
- #print '[%s] bm_img_path(%s), bm_img_size(%s)\n' \
- # % (__file__, bm_img_path, bm_img_size)
-
# get curr_build_snapshot_id
query = "SELECT id FROM build_snapshot WHERE snapshot_name = %s"
query_data = (build_id,)
trigger_next("IMAGE-TESTING", fields)
if buildmonitor_enabled:
+ bm_base_path = os.getenv('PATH_REPO_BASE')
+ bm_img_url = os.path.join(bm_base_path, fields['repo_path'], fields['images_path'])
+ bm_img_path = bm_img_url + '/' + build_id + '_' + bm_device_name + '.tar.gz'
+ bm_img_size = os.path.getsize(bm_img_path)
+ #print '[%s] bm_img_path(%s), bm_img_size(%s)\n' \
+ # % (__file__, bm_img_path, bm_img_size)
+
bm_end_datetime = datetime.datetime.now()
bm_data = {"bm_stage": 'Image',
"status" : status,
"fields" : fields,
"bm_start_datetime" : str(bm_start_datetime),
"bm_end_datetime" : str(bm_end_datetime),
- "build_id": build_id
+ "build_id" : build_id,
+ "bm_img_size" : bm_img_size
}
trigger_next("BUILD-MONITOR", bm_data)
else: