File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Docker
2
+ # Build and push an image to Azure Container Registry
3
+ # https://docs.microsoft.com/azure/devops/pipelines/languages/docker
4
+
5
+ trigger :
6
+ - master
7
+
8
+ resources :
9
+ - repo : self
10
+
11
+ variables :
12
+ # Container registry service connection established during pipeline creation
13
+ dockerRegistryServiceConnection : ' 4ee05316-45b2-4c65-9574-a13237e77eb4'
14
+ imageRepository : ' app1nginx'
15
+ containerRegistry : ' aksdevopsacr.azurecr.io'
16
+ dockerfilePath : ' $(Build.SourcesDirectory)/Dockerfile'
17
+ tag : ' $(Build.BuildId)'
18
+
19
+ # Agent VM image name
20
+ vmImageName : ' ubuntu-latest'
21
+
22
+ stages :
23
+ - stage : Build
24
+ displayName : Build and push stage
25
+ jobs :
26
+ - job : Build
27
+ displayName : Build
28
+ pool :
29
+ vmImage : $(vmImageName)
30
+ steps :
31
+ - task : Docker@2
32
+ displayName : Build and push an image to container registry
33
+ inputs :
34
+ command : buildAndPush
35
+ repository : $(imageRepository)
36
+ dockerfile : $(dockerfilePath)
37
+ containerRegistry : $(dockerRegistryServiceConnection)
38
+ tags : |
39
+ $(tag)
You can’t perform that action at this time.
0 commit comments