Resolve phabricator diff id and add link in description
This commit is contained in:
parent
cff541258d
commit
4762ba5c3f
1 changed files with 10 additions and 1 deletions
11
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
11
Jenkins/Phabricator-pipeline/Jenkinsfile
vendored
|
@ -33,7 +33,16 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
echo "Building diff ${DIFF_ID} with PHID ${PHID}"
|
echo "Building diff ${DIFF_ID} with PHID ${PHID}"
|
||||||
script {
|
script {
|
||||||
currentBuild.displayName = "diff ${DIFF_ID}"
|
def revision_phid = sh(script:
|
||||||
|
'echo \'{"constraints":{"ids":[' + DIFF_ID + ']}}\' | '+
|
||||||
|
'arc call-conduit --conduit-uri=$PHABRICATOR_HOST --conduit-token $CONDUIT_TOKEN differential.diff.search | ' +
|
||||||
|
'jq -r ".response.data[0].fields.revisionPHID"', returnStdout: true).trim()
|
||||||
|
def drev_id = sh(script:
|
||||||
|
'echo \'{"constraints":{"phids":["' + revision_phid + '"]}}\' | ' +
|
||||||
|
'arc call-conduit --conduit-uri=$PHABRICATOR_HOST --conduit-token $CONDUIT_TOKEN differential.revision.search | ' +
|
||||||
|
'jq -r ".response.data[0].id"', returnStdout: true).trim()
|
||||||
|
currentBuild.displayName += " D${drev_id}"
|
||||||
|
currentBuild.description = "<a href='https://reviews.llvm.org/D${drev_id}'>D${drev_id}</a>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue