Merge pull request #6238 from lmskater/add-rebuild-git-fail

[Jenkins][ci skip] Add rebuild when git fail in pull request builder
This commit is contained in:
James Chen 2014-04-11 15:11:24 +08:00
commit e24a975599
1 changed files with 15 additions and 4 deletions

View File

@ -9,12 +9,23 @@ if(os.path.exists('tools/jenkins-scripts/pull-request-builder.py') == False):
else: else:
os.system("cp -r " + source_dir + "/. .") os.system("cp -r " + source_dir + "/. .")
os.system('git reset --hard') def clean_workspace():
os.system('git reset --hard')
os.system('git clean -xdf -f')
clean_workspace()
os.system('git checkout develop') os.system('git checkout develop')
os.system('git reset --hard') clean_workspace()
os.system('git pull origin develop') os.system('git pull origin develop')
ret = os.system('python -u tools/jenkins-scripts/pull-request-builder.py')
os.system('git reset --hard') for i in range(0, 3):
ret = os.system('python -u tools/jenkins-scripts/pull-request-builder.py')
if(ret > 255):
ret >>= 8
if(ret == 0) or (ret == 1):
break
clean_workspace()
print ret print ret
if(ret > 0): if(ret > 0):
ret = 1 ret = 1