Skip to content

Commit 613f3e5

Browse files
author
Power Cloud Robot
authored
Merge pull request #70 from alokgoswami-ag/fix-get-nightly-details
changes in build log for nightly details
2 parents b6f2d6f + 31fc129 commit 613f3e5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

monitor.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,13 +479,23 @@ def get_nightly(build_log_url,build_log_response, job_platform):
479479
nightly_initial_log_re = re.compile('(Resolved release {}-initial to (\S+))'.format(job_platform), re.MULTILINE|re.DOTALL)
480480
nightly_initial_log_match = nightly_initial_log_re.search(build_log_response.text)
481481
if nightly_initial_log_match is None:
482-
nightly = "Unable to fetch nightly {}-initial information- No match found".format(job_platform)
482+
nightly_initial_log_re = re.compile('(Using explicitly provided pull-spec for release {}-initial \((\S+)\))'.format(job_platform), re.MULTILINE|re.DOTALL)
483+
nightly_initial_log_match = nightly_initial_log_re.search(build_log_response.text)
484+
if nightly_initial_log_match is None:
485+
nightly =" Unable to fetch nightly {}-initial information- No match found".format(job_platform)
486+
else:
487+
nightly = job_platform+"-initial-"+ nightly_initial_log_match.group(2)
483488
else:
484489
nightly = job_platform+"-initial-"+ nightly_initial_log_match.group(2)
485490
nightly_latest_log_re = re.compile('(Resolved release {}-latest to (\S+))'.format(job_platform), re.MULTILINE|re.DOTALL)
486491
nightly_latest_log_match = nightly_latest_log_re.search(build_log_response.text)
487492
if nightly_latest_log_match is None:
488-
nightly = nightly + " Unable to fetch nightly {}-latest information- No match found".format(job_platform)
493+
nightly_latest_log_re = re.compile('(Using explicitly provided pull-spec for release {}-latest \((\S+)\))'.format(job_platform), re.MULTILINE|re.DOTALL)
494+
nightly_latest_log_match = nightly_latest_log_re.search(build_log_response.text)
495+
if nightly_latest_log_match is None:
496+
nightly = nightly + " Unable to fetch nightly {}-latest information- No match found".format(job_platform)
497+
else:
498+
nightly = nightly +" "+job_platform+"-latest-"+ nightly_latest_log_match.group(2)
489499
else:
490500
nightly = nightly +" "+job_platform+"-latest-"+ nightly_latest_log_match.group(2)
491501
return nightly

0 commit comments

Comments
 (0)