-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
61 lines (54 loc) · 1.36 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
trigger:
tags:
include:
- v*
branches:
include:
- develop
- master
- release*
paths:
exclude:
- README.md
pr:
- master
- develop
variables:
repository: 'focal-freedom-236620/test-runner'
buildTag: $(Build.BuildId)
imageTag: '3.0.0-dev'
jobs:
- job: TestRunner
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: Docker@2
displayName: 'Docker build'
inputs:
containerRegistry: 'Edgeworx GCP'
repository: $(repository)
command: 'build'
Dockerfile: "Dockerfile"
tags: |
$(buildTag)
$(imageTag)
latest
- task: Docker@2
displayName: 'Docker push'
inputs:
containerRegistry: 'Edgeworx GCP'
repository: $(repository)
command: 'push'
Dockerfile: "Dockerfile"
tags: |
$(buildTag)
$(imageTag)
latest
- script: |
echo "gcr.io/${REPOSITORY}:$(imageTag)" > $(Build.ArtifactStagingDirectory)/docker-image.txt
displayName: 'Save Docker image name to artifact'
- task: PublishPipelineArtifact@0
displayName: 'Publish Docker image name artifact'
inputs:
artifactName: 'docker-image.txt'
targetPath: $(Build.ArtifactStagingDirectory)/docker-image.txt