Skip to content

Commit d590495

Browse files
committed
Set up CI with Azure Pipelines
1 parent 9ecf4a4 commit d590495

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

azure-pipelines.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Docker image
2+
# Build a Docker image to deploy, run, or push to a container registry.
3+
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
5+
6+
trigger:
7+
- master
8+
9+
pool:
10+
vmImage: 'Ubuntu-16.04'
11+
12+
variables:
13+
imageName: 'your-container-image-name:$(build.buildId)'
14+
15+
steps:
16+
- script: |
17+
docker build -t $(acrId).azurecr.io/result:$(build.buildId) ./result
18+
displayName: 'Build result'
19+
20+
- script: docker build -t $(acrId).azurecr.io/vote:$(build.buildId) ./vote
21+
displayName: 'Build vote'
22+
23+
- script: docker build -t $(acrId).azurecr.io/worker:$(build.buildId) ./worker
24+
displayName: 'Build worker'
25+
26+
- script: |
27+
docker login -u $(acrId) -p $(acr_pswd) $(acrId).azurecr.io
28+
docker push $(acrId).azurecr.io/result:$(build.buildId)
29+
docker push $(acrId).azurecr.io/vote:$(build.buildId)
30+
docker push $(acrId).azurecr.io/worker:$(build.buildId)
31+
displayName: 'Push all images'

0 commit comments

Comments
 (0)