-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment-template.yml
55 lines (52 loc) · 2.25 KB
/
deployment-template.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
jobs:
- deployment: DeployInfrastructure
displayName: Deploy Infrastructure
environment: ${{ parameters.environment}}
strategy:
runOnce:
deploy:
steps:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'drop'
targetPath: '$(Pipeline.Workspace)/drop/'
- task: replacetokens@5
displayName: Replace Tokens
inputs:
rootDirectory: '$(Pipeline.Workspace)/drop/Arm'
targetFiles: '**/*.json'
encoding: 'auto'
tokenPattern: 'default'
writeBOM: true
actionOnMissing: 'warn'
keepToken: false
actionOnNoFiles: 'continue'
enableTransforms: false
enableRecursion: false
useLegacyPattern: false
enableTelemetry: true
- task: AzureResourceManagerTemplateDeployment@3
displayName: Deploy Resources
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: '${{ parameters.serviceConnectionName }}'
subscriptionId: '6d5cbc0a-2e0a-4d07-98b8-c80779e82a42'
action: 'Create Or Update Resource Group'
resourceGroupName: '$(resource_group)'
location: '$(location)'
templateLocation: 'Linked artifact'
csmFile: '$(Pipeline.Workspace)/drop/Arm/azure.bicep'
csmParametersFile: '$(Pipeline.Workspace)/drop/Arm/azure.parameters.json'
deploymentMode: Incremental
deploymentName: '$(Build.Repository.Name)_DeployResources_$(Build.BuildNumber)'
- task: AzureRmWebAppDeployment@4
displayName: Deploy Service
inputs:
ConnectionType: 'AzureRM'
azureSubscription: '${{ parameters.serviceConnectionName }}'
appType: 'webAppContainer'
WebAppName: $(visitor_service_name)
DockerNamespace: '$(docker_hostname)'
DockerRepository: '${{ parameters.docker_repoName }}'
DockerImageTag: '$(tag)'