2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-12-09 02:22:13 +00:00

Merge pull request #5770 from robin2008/travis

Make travis script go ahead when it failed to get PR information after max retries
This commit is contained in:
Weihua Hu
2018-11-07 13:47:19 +08:00
committed by GitHub

View File

@@ -114,7 +114,7 @@ sub check_pr_format{
unless ($pr_url_resp) {
print "[check_pr_format] After $retries retries, not able to get response from $pr_url \n";
# Failed after trying a few times, return error
return 1;
return $counter;
}
my $pr_content = decode_json($pr_url_resp);
my $pr_title = $pr_content->{title};
@@ -617,9 +617,13 @@ print Dumper \@disk;
$last_func_start = timelocal(localtime());
print GREEN "\n------ Checking Pull Request Format ------\n";
$rst = check_pr_format();
my $redo_check_pr = 0;
if($rst){
print RED "Check of pull request format failed\n";
exit $rst;
if($rst <= $retries) {
print RED "Check of pull request format failed\n";
exit $rst;
}
$redo_check_pr = 1;
}
mark_time("check_pr_format");
@@ -660,4 +664,14 @@ if($rst){
}
mark_time("run_fast_regression_test");
if ($redo_check_pr) {
print GREEN "\n------ Checking Pull Request Format ------\n";
$rst = check_pr_format();
if($rst){
print RED "Check of pull request format failed\n";
exit $rst;
}
mark_time("check_pr_format");
}
exit 0;