added error handling to patch script
This commit is contained in:
commit
e59db9cbcd
2 changed files with 18 additions and 2 deletions
12
Jenkins/master-pipeline/Jenkinsfile
vendored
12
Jenkins/master-pipeline/Jenkinsfile
vendored
|
@ -34,9 +34,19 @@ pipeline {
|
|||
sh 'llvm-premerge-checks/scripts/run_cmake.sh'
|
||||
}
|
||||
}
|
||||
stage('ninja all') {
|
||||
steps {
|
||||
sh 'llvm-premerge-checks/scripts/run_ninja.sh all'
|
||||
}
|
||||
}
|
||||
stage('ninja check') {
|
||||
steps {
|
||||
sh 'llvm-premerge-checks/scripts/run_ninja.sh check'
|
||||
}
|
||||
}
|
||||
stage('ninja check-all') {
|
||||
steps {
|
||||
sh 'llvm-premerge-checks/scripts/run_ninja_check-all.sh'
|
||||
sh 'llvm-premerge-checks/scripts/run_ninja.sh check-all'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,10 +37,16 @@ def _get_parent_hash(diff_id: str, phab:Phabricator) -> str:
|
|||
|
||||
|
||||
def _git_checkout(git_hash:str):
|
||||
subprocess.check_call('git reset --hard {}'.format(git_hash), shell=True)
|
||||
try:
|
||||
print('Checking out git hash {}'.format(hash))
|
||||
subprocess.check_call('git reset --hard {}'.format(git_hash), shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
print('ERROR: checkout failed, using master instead.')
|
||||
subprocess.check_call('git checkout master')
|
||||
|
||||
|
||||
def _apply_patch(diff_id: str, conduit_token: str, host: str):
|
||||
print('running arc path...')
|
||||
cmd = 'arc patch --nobranch --no-ansi --diff "{}" --nocommit '\
|
||||
'--conduit-token "{}" --conduit-uri "{}"'.format(
|
||||
diff_id, conduit_token, host )
|
||||
|
|
Loading…
Reference in a new issue