-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
60 lines (55 loc) · 1.7 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
trigger:
- main
pr: none
resources:
- repo: self
pool:
vmImage: ubuntu-latest
variables:
repository: 'godeltech/codereview.orchestrator'
foldername: 'CodeReview.Orchestrator'
srcproject: 'CodeReview.Orchestrator.csproj'
artifactstagingdirectory: 'artifacts'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
steps:
- task: gitversion/setup@0
displayName: Setup GitVersion
inputs:
versionSpec: '5.x'
- script: pwd && ls
- task: gitversion/execute@0
displayName: Execute GitVersion
- task: DotNetCoreCLI@2
displayName: Pack a nuget package
inputs:
command: 'pack'
packagesToPack: './src/$(foldername)/$(srcproject)'
configuration: 'Release'
packDirectory: '$(artifactstagingdirectory)'
versioningScheme: 'byEnvVar'
versionEnvVar: 'BUILD_NUMBER'
env:
BUILD_NUMBER: $(Build.BuildNumber)
- task: NuGetCommand@2
displayName: Nuget push
inputs:
command: push
packagesToPush: ./$(artifactstagingdirectory)/*.nupkg
nuGetFeedType: external
publishFeedCredentials: NuGet
- task: Docker@2
displayName: Build and Push an image
inputs:
buildContext: './src/'
containerRegistry: 'docker-hub'
repository: $(repository)
command: 'buildAndPush'
Dockerfile: './src/$(foldername)/Dockerfile'
tags: |
$(Build.BuildNumber)
latest