Merge pull request #11642 from andyque/fix-jenkins-status-v3.6

fix jenkins pull request builder return value
This commit is contained in:
minggo 2015-04-29 10:28:35 +08:00
commit 15c6af1027
2 changed files with 8 additions and 5 deletions

View File

@ -116,7 +116,7 @@ def syntronize_remote_pr():
git_fetch_pr = "git fetch origin pull/" + str(pr_num) + "/head" git_fetch_pr = "git fetch origin pull/" + str(pr_num) + "/head"
ret = os.system(git_fetch_pr) ret = os.system(git_fetch_pr)
if(ret != 0): if(ret != 0):
sys.exit(ret) sys.exit(1)
#checkout a new branch from v3 or v4-develop #checkout a new branch from v3 or v4-develop
git_checkout = "git checkout -b " + "pull" + str(pr_num) git_checkout = "git checkout -b " + "pull" + str(pr_num)
@ -140,7 +140,7 @@ def syntronize_remote_pr():
git_update_submodule = "git submodule update --init --force" git_update_submodule = "git submodule update --init --force"
ret = os.system(git_update_submodule) ret = os.system(git_update_submodule)
if(ret != 0): if(ret != 0):
sys.exit(ret) sys.exit(1)
def gen_scripting_bindings(): def gen_scripting_bindings():
@ -149,7 +149,7 @@ def gen_scripting_bindings():
if(branch != 'v1' and branch != 'v2'): if(branch != 'v1' and branch != 'v2'):
ret = os.system("python tools/jenkins-scripts/slave-scripts/gen_jsb.py") ret = os.system("python tools/jenkins-scripts/slave-scripts/gen_jsb.py")
if(ret != 0): if(ret != 0):
sys.exit(ret) sys.exit(1)
def do_build_slaves(): def do_build_slaves():
@ -237,7 +237,7 @@ if __name__ == '__main__':
sys_ret = 1 sys_ret = 1
finally: finally:
print "return value is " + str(sys_ret) print "return value is " + str(sys_ret)
if sys_ret > 0: if sys_ret != 0:
sys.exit(1) sys.exit(1)
else: else:
sys.exit(0) sys.exit(0)

View File

@ -12,4 +12,7 @@ if __name__ == '__main__':
traceback.print_exc() traceback.print_exc()
sys_ret = 1 sys_ret = 1
finally: finally:
sys.exit(sys_ret) if sys_ret != 0:
sys.exit(1)
else:
sys.exit(0)