-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (50 loc) · 1.32 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
44
45
46
47
48
49
50
51
52
53
54
55
56
name : dotnet-sheets-notifications
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
tag: '$(Build.BuildId)'
workingDirectory: '$(System.DefaultWorkingDirectory)/'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build and push docker image
steps:
- task: Docker@2
displayName: Build the docker image
inputs:
command: build
containerRegistry: dockerHub
repository: thbst16/azure-function-notification
tags: |
$(Build.BuildId)
latest
- task: Docker@2
displayName: Push the image to Dockerhub
inputs:
command: push
containerRegistry: dockerHub
repository: thbst16/azure-function-notification
tags: |
$(Build.BuildId)
latest
- stage: Deploy
displayName: Deploy docker container
dependsOn: Build
jobs:
- job: Deploy
displayName: Deploy the container to Azure Web App using Docker Compose
steps:
- task: CmdLine@2
inputs:
script: dir
workingDirectory: $(workingDirectory)
- task: AzureWebAppContainer@1
displayName: Deploy the docker images
inputs:
azureSubscription: sheets-conn
appName: dotnet-sheets-notification
multicontainerConfigFile: $(workingDirectory)/docker-compose.yml