File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-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 : ' d676875f-d1fb-485a-8da4-88d6bfb04604'
14+ imageRepository : ' mypythondockerrepo'
15+ containerRegistry : ' myacrrep31.azurecr.io'
16+ dockerfilePath : ' $(Build.SourcesDirectory)/Dockerfile'
17+ tag : ' $(Build.BuildId)'
18+
19+ vmImageName : ' ubuntu-latest'
20+
21+ stages :
22+ - stage : Build
23+ displayName : Build and push stage
24+ jobs :
25+ - job : Build
26+ displayName : Build
27+ pool :
28+ vmImage : $(vmImageName)
29+ steps :
30+ - task : Docker@2
31+ displayName : Build and push an image to container registry
32+ inputs :
33+ command : buildAndPush
34+ repository : $(imageRepository)
35+ dockerfile : $(dockerfilePath)
36+ containerRegistry : $(dockerRegistryServiceConnection)
37+ tags : |
38+ $(tag)
You can’t perform that action at this time.
0 commit comments