mirror of https://github.com/axmolengine/axmol.git
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:
commit
e24a975599
|
@ -9,12 +9,23 @@ if(os.path.exists('tools/jenkins-scripts/pull-request-builder.py') == False):
|
|||
else:
|
||||
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 reset --hard')
|
||||
clean_workspace()
|
||||
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
|
||||
if(ret > 0):
|
||||
ret = 1
|
||||
|
|
Loading…
Reference in New Issue