File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,27 @@ stages:
4444 - template : update-maven-version-steps.yml
4545 parameters :
4646 mavenSettingsFilePath : $(mavenSettings.secureFilePath)
47+ - task : PythonScript@0
48+ name : fixBranchName
49+ displayName : ' Compute short branch name for buildInfo'
50+ inputs :
51+ scriptSource : ' inline'
52+ script : |
53+ branch = "$(Build.SourceBranch)"
54+ refPrefix = "refs/heads/"
55+ if branch.startswith(refPrefix):
56+ fixedBranch = branch[len(refPrefix):]
57+ else:
58+ fixedBranch = branch
59+ # Workaround for https://github.com/Microsoft/azure-pipelines-agent/issues/838
60+ print("##vso[task.setvariable variable=fixedBranch;isOutput=true]" + fixedBranch)
4761 - task : Maven@3
4862 displayName : ' Run Maven deploy'
4963 env :
5064 ARTIFACTORY_DEPLOY_USERNAME : $(ARTIFACTORY_DEPLOY_USERNAME)
5165 ARTIFACTORY_DEPLOY_PASSWORD : $(ARTIFACTORY_DEPLOY_PASSWORD)
66+ GIT_SHA1 : $(Build.SourceVersion)
67+ GITHUB_BRANCH : $(fixBranchName.fixedBranch)
5268 inputs :
5369 goals : ' deploy'
5470 options : >-
You can’t perform that action at this time.
0 commit comments