-
Notifications
You must be signed in to change notification settings - Fork 23
/
azure-pipelines.yml
53 lines (44 loc) · 1.09 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
trigger:
branches:
include:
- main
- rel/*
pr:
branches:
include:
- main
- rel/*
pool:
vmImage: ubuntu-latest
variables:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '0d3cc2fe-71c4-459b-ae14-ac93ff043725'
imageRepository: 'membership'
containerRegistry: 'dotnetfoundation.azurecr.io'
dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildId)'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.x'
inputs:
version: 3.1.x
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: ./nbgv cloud
displayName: Set Version
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
buildContext: ./
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)