Skip to content

Commit

Permalink
Add environment variables required by release to buildInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jblievremont committed Mar 12, 2020
1 parent 3102096 commit 63ec898
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,27 @@ stages:
- template: update-maven-version-steps.yml
parameters:
mavenSettingsFilePath: $(mavenSettings.secureFilePath)
- task: PythonScript@0
name: fixBranchName
displayName: 'Compute short branch name for buildInfo'
inputs:
scriptSource: 'inline'
script: |
branch = "$(Build.SourceBranch)"
refPrefix = "refs/heads/"
if branch.startswith(refPrefix):
fixedBranch = branch[len(refPrefix):]
else:
fixedBranch = branch
# Workaround for https://github.com/Microsoft/azure-pipelines-agent/issues/838
print("##vso[task.setvariable variable=fixedBranch;isOutput=true]" + fixedBranch)
- task: Maven@3
displayName: 'Run Maven deploy'
env:
ARTIFACTORY_DEPLOY_USERNAME: $(ARTIFACTORY_DEPLOY_USERNAME)
ARTIFACTORY_DEPLOY_PASSWORD: $(ARTIFACTORY_DEPLOY_PASSWORD)
GIT_SHA1: $(Build.SourceVersion)
GITHUB_BRANCH: $(fixBranchName.fixedBranch)
inputs:
goals: 'deploy'
options: >-
Expand Down

0 comments on commit 63ec898

Please sign in to comment.