-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
44 lines (38 loc) · 1.35 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
# - This is the build pipeline to build and push the automated test docker image to ACR
trigger:
- master
resources:
- repo: self
stages:
- stage: Build
displayName: Build and Push image
jobs:
- job: Build
displayName: Build and Push
pool:
vmImage: 'ubuntu-latest'
steps:
- task: CmdLine@2
displayName: 'Build and Push Image'
inputs:
script: |
docker build -t testdigitalshopify:latest .
docker save --output testdigitalshopify-latest.tar testdigitalshopify:latest
# docker login $(acrRegistry) --username $(acrusername) --password $(azureACRToken)
# docker tag testdigitalshopify $(acrRegistry)/testdigitalshopify
# docker push $(acrRegistry)/testdigitalshopify
# - task: Docker@2
# inputs:
# containerRegistry: 'acr'
# repository: 'postbuildqa/maven-cucumber'
# command: 'buildAndPush'
# Dockerfile: '**/Dockerfile'
- task: CopyFiles@2
inputs:
Contents: 'testdigitalshopify-latest.tar'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'