Created
December 20, 2019 08:07
-
-
Save renevanosnabrugge/ebac7f36f40a6a57e235cef2e995c023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pool: | |
vmImage: 'ubuntu-latest' | |
trigger: | |
- master | |
- development | |
steps: | |
- task: PowerShell@2 | |
displayName: Determine source branch | |
inputs: | |
targetType: 'inline' | |
script: | | |
switch(${env:BUILD_SOURCEBRANCH}) { | |
'refs/heads/master' {Write-Host "##vso[task.setvariable variable=admiralBaseUri]https://admiral-p.azurefd.net"; } | |
'refs/heads/development' {Write-Host "##vso[task.setvariable variable=admiralBaseUri]https://admiral-d.azurefd.net"; } | |
default {Write-Host "##vso[task.setvariable variable=admiralBaseUri]NONE"; } | |
} | |
- task: ArchiveFiles@2 | |
displayName: 'Zip Wiki' | |
inputs: | |
rootFolderOrFile: '$(Build.SourcesDirectory)' | |
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.Repository.Name).zip' | |
- task: PowerShell@2 | |
displayName: 'Upload Zip to Storage Account' | |
inputs: | |
targetType: filePath | |
filePath: ./pipelines/uploadRepoToBlobStorage.ps1 | |
arguments: '-url $(publishUrl) -fileToUpload "$(Build.ArtifactStagingDirectory)/$(Build.Repository.Name).zip"' | |
workingDirectory: pipelines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment