-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.release.yml
34 lines (32 loc) · 1.35 KB
/
azure-pipelines.release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
parameters:
- name: environment
type: string
jobs:
- deployment: ${{ parameters.environment }}
displayName: 'Deploy Resources'
variables:
- group: '${{ parameters.environment }}-api' # points to variable group in Azure DevOps
environment: ${{ parameters.environment }} # points to environments in Azure DevOps
strategy:
runOnce:
deploy:
steps:
- task: ArchiveFiles@2
displayName: 'Archive Files'
inputs:
rootFolderOrFile: '$(Pipeline.Workspace)/$(ARTIFACT_NAME)/Opdex.Platform.WebApi'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- task: AzureWebApp@1
inputs:
azureSubscription: $(azureSubscription)
appType: 'webApp'
appName: 'app-opdex-${{ parameters.environment }}-api'
package: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
deploymentMethod: 'auto'
deployToSlotOrASE: true
slotName: 'staging'
appSettings: '-OpdexConfiguration:CommitHash $(Build.SourceVersion) -Azure:KeyVault:Name $(keyVaultName)'
displayName: Deploy to App Service