-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
43 lines (40 loc) · 1.08 KB
/
azure-pipelines.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
trigger: none
variables:
buildConfiguration: 'Release'
webRepository: 'web'
tag: '$(Build.BuildId)'
stages:
- stage: 'Build'
displayName: 'Build and push'
jobs:
- job: 'Build'
displayName: 'Build job'
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: Docker@2
displayName: 'Build and push the image to container registry'
inputs:
command: buildAndPush
buildContext: $(Build.Repository.LocalPath)
repository: $(webRepository)
dockerfile: '$(Build.SourcesDirectory)/Tailspin.SpaceGame.Web/Dockerfile'
containerRegistry: 'Container Registry Connection'
tags: |
$(tag)
- stage: 'Deploy'
displayName: 'Deploy the container'
dependsOn: Build
jobs:
- job: 'Deploy'
displayName: 'Deploy job'
pool:
vmImage: 'ubuntu-18.04'
variables:
- group: Release
steps:
- task: AzureWebAppContainer@1
inputs:
appName: $(WebAppName)
azureSubscription: 'Resource Manager - Tailspin - Space Game'
imageName: $(RegistryName)/$(webRepository):$(build.buildId)