'snapshot.code?start=%s&end=%s&profile_filter=%s'
% (start_date, end_date, target.split(':ref:')[0]))
+
+ sys.stdout.flush()
+
snapshot_history = []
board_data = requests.get(path).text
+
for line in board_data.replace('\\n', '').replace('\\', '').replace('null','""').split('\n'):
+ if line is None or line == '' or len(line) <= 0:
+ continue
full_list = ast.literal_eval(line)
# Make sure ordering
full_list = sorted(full_list, key=lambda k:k['start_time'], reverse=False)
'snapshot.code?snapshot=%s' % (sn.get('snapshot_name')))
srs_in_snapshot = requests.get(path).text
for line2 in srs_in_snapshot.replace('\\n', '').replace('\\', '').replace('null','""').split('\n'):
+ if line2 is None or line2 == '' or line2 == '\n' or len(line2) <= 0:
+ continue
sr_list = ast.literal_eval(line2)
for sr in sr_list:
sr_count += 1
# Select matching SR info
todo_dict_repos = [ todo_dict_latest[x].get('git') for x in todo_dict_latest ]
tgt = src.split(':%s:' % target.split(':ref:')[0])[0]
+ #FIXME:
+ #request_info = {'source': target.split(':ref:')[0],
+ # 'target': tgt,
request_info = {'source': target.split(':ref:')[0],
- 'target': tgt,
+ 'target': os.getenv('SYNC_TARGET_PROJECT'),
'project_to_create_timestamp': datetime.utcnow().strftime("%Y%m%d.%H%M%S"),
'sr': []}
request_sr_list = []
remote_jenkins_build_job(os.getenv('JENKINS_URL_INTERNAL'),
os.getenv('JENKINS_USER'),
os.getenv('JENKINS_PW'),
- 'submit-request-sync',
+ os.getenv('SR_SYNC_TRIGGER_JOB_NAME'),
None, None, [(fname, fname)])
print '\n\nFinal data to be sync...'