another try with different paths
This commit is contained in:
parent
a33d2ce141
commit
554461f344
2 changed files with 8 additions and 4 deletions
4
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
4
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
|
@ -34,7 +34,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('arc patch') {
|
stage('arc patch') {
|
||||||
steps {
|
steps {
|
||||||
sh 'llvm-premerge-checks/scripts/phabtalk/apply_patch.py --host="https://reviews.llvm.org" --conduit-token="${CONDUIT_TOKEN}"'
|
dir("llvm-premerge-checks/scripts/phabtalk"){
|
||||||
|
sh 'apply_patch.py --host="https://reviews.llvm.org" --conduit-token="${CONDUIT_TOKEN}"'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('CMake') {
|
stage('CMake') {
|
||||||
|
|
|
@ -34,12 +34,14 @@ def _get_parent_hash(diff_id: str, phab:Phabricator) -> str:
|
||||||
diff = phab.differential.getdiff(diff_id=diff_id)
|
diff = phab.differential.getdiff(diff_id=diff_id)
|
||||||
return diff['sourceControlBaseRevision']
|
return diff['sourceControlBaseRevision']
|
||||||
|
|
||||||
|
|
||||||
def _git_checkout(git_hash:str):
|
def _git_checkout(git_hash:str):
|
||||||
subprocess.check_call('git reset --hard {}'.format(git_hash), shell=True)
|
subprocess.check_call('git reset --hard "{}"'.format(git_hash), shell=True)
|
||||||
subprocess.check_call('git clean -fdx', shell=True)
|
subprocess.check_call('git clean -fdx', shell=True)
|
||||||
|
|
||||||
|
|
||||||
def _apply_patch(diff_id: str, conduit_token: str, host: str):
|
def _apply_patch(diff_id: str, conduit_token: str, host: str):
|
||||||
cmd = 'arc patch --nobranch --no-ansi --diff {} --nocommit '\
|
cmd = 'arc patch --nobranch --no-ansi --diff "{}" --nocommit '\
|
||||||
'--conduit-token "{}" --conduit-uri "{}"'.format(
|
'--conduit-token "{}" --conduit-uri "{}"'.format(
|
||||||
diff_id, conduit_token, host )
|
diff_id, conduit_token, host )
|
||||||
subprocess.call(cmd, shell=True)
|
subprocess.call(cmd, shell=True)
|
||||||
|
@ -49,7 +51,7 @@ def _parse_args():
|
||||||
parser = argparse.ArgumentParser(description='Apply a phabricator patch.')
|
parser = argparse.ArgumentParser(description='Apply a phabricator patch.')
|
||||||
parser.add_argument('--conduit-token', type=str, dest='conduit_token', default=None)
|
parser.add_argument('--conduit-token', type=str, dest='conduit_token', default=None)
|
||||||
parser.add_argument('--host', type=str, dest='host', default="None",
|
parser.add_argument('--host', type=str, dest='host', default="None",
|
||||||
help="full URL to API with trailing slash, e.g. https://reviews.llvm.org/api/")
|
help="full URL to API without trailing slash, e.g. https://reviews.llvm.org")
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue