Skip to content

Commit 7456301

Browse files
committed
Set up CI with Azure Pipelines
[skip ci]
1 parent 36e92cd commit 7456301

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

azure-pipelines.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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)

0 commit comments

Comments
 (0)