-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
49 lines (43 loc) · 1.37 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
# Docker
# Build and push an image to Azure Container Registry
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '414ddffa-6500-4311-a4de-36edccee121c'
imageRepository: 'apimpackagetools'
containerRegistry: 'apimemt.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: UniversalPackages@0
inputs:
command: 'download'
downloadDirectory: '$(System.DefaultWorkingDirectory)'
feedsToUse: 'internal'
vstsFeed: '878c65e7-0897-4085-87c3-357a72b45fb1/31e859cf-4f29-490c-9e3f-556992b09855'
vstsFeedPackage: 'apigateway_install'
vstsPackageVersion: '7.7.20200330'
verbosity: 'Debug'
- task: Docker@2
inputs:
containerRegistry: '$(dockerRegistryServiceConnection)'
repository: '$(imageRepository)'
command: 'buildAndPush'
dockerfile: $(dockerfilePath)
buildContext: '$(System.DefaultWorkingDirectory)'
tags: |
$(tag)