From dc0ccb33fd46f139f43071e6b15488cc566e74cc Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 21 Aug 2018 23:31:42 +0200 Subject: [PATCH] [jenkins] Don't give VSTS a fake branch. (#4667) Something in VSTS changed, and now fake branch names don't work anymore. So instead use real branch names (and for pull requests I've created a 'pull-request' branch we can use). --- jenkins/Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index f6332702da..d7014c8200 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -366,8 +366,12 @@ timestamps { } else { def outputFile = "${workspace}/xamarin-macios/wrench-launch-external.output.tmp" try { + // VSTS does not allow any branch name anymore, it has to be an existing branch. + // Since pull requests don't create branches in the xamarin org (that VSTS sees at least), + // I've created a 'pull-request' branch which we'll use for pull requests. + def vsts_branch = isPr ? "pull-request" : branchName; withCredentials ([string (credentialsId: 'macios_provisionator_pat', variable: 'PROVISIONATOR_VSTS_PAT')]) { - sh ("make -C ${workspace}/xamarin-macios/tests wrench-launch-external MAC_PACKAGE_URL=${xmPackageUrl} IOS_PACKAGE_URL=${xiPackageUrl} WRENCH_URL=${env.RUN_DISPLAY_URL} BUILD_REVISION=${gitHash} BUILD_LANE=jenkins/${branchName} BUILD_WORK_HOST=${env.NODE_NAME} 2>&1 | tee ${outputFile}") + sh ("make -C ${workspace}/xamarin-macios/tests wrench-launch-external MAC_PACKAGE_URL=${xmPackageUrl} IOS_PACKAGE_URL=${xiPackageUrl} WRENCH_URL=${env.RUN_DISPLAY_URL} BUILD_REVISION=${gitHash} BUILD_LANE=${vsts_branch} BUILD_WORK_HOST=${env.NODE_NAME} 2>&1 | tee ${outputFile}") } processAtMonkeyWrench (outputFile) } catch (error) {