This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
68 lines (59 loc) · 1.87 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
62
63
64
65
66
67
68
# .NET Core
# Execute only on master branch
trigger:
branches:
include:
- master
paths:
include:
- "*"
exclude:
- "azure-pipelines.yml"
pool:
name: Azure Pipelines
vmImage: windows-latest
variables:
buildConfiguration: 'Release'
apiProject: 'DIGNDB.App.SmitteStop.API\DIGNDB.App.SmitteStop.API.csproj'
hangFireProject: 'DIGNDB.APP.SmitteStop.Jobs\DIGNDB.APP.SmitteStop.Jobs.csproj'
buildPlatform: 'AnyCPU'
steps:
# Build the project
- task: DotNetCoreCLI@2
inputs:
command: 'build'
arguments: '--configuration $(buildConfiguration)'
displayName: 'Building'
# Run tests and collect code coverage
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*Testing/*.csproj'
arguments: '--configuration $(BuildConfiguration) --collect "Code coverage" /p:Threshold=58 /p:ThresholdStat=total /p:thresholdType=line'
displayName: 'Running tests'
# Create the deploy package for API
- task: DotNetCoreCLI@2
inputs:
command: publish
publishWebProjects: false
projects: '$(apiProject)'
arguments: '--configuration $(BuildConfiguration) --output $(System.DefaultWorkingDirectory)/Deploy/API'
zipAfterPublish: true
modifyOutputPath: true
displayName: 'Build API deployment package'
# Create the deploy package for HangFire
- task: DotNetCoreCLI@2
inputs:
command: publish
publishWebProjects: false
projects: '$(hangFireProject)'
arguments: '--configuration $(BuildConfiguration) --output $(System.DefaultWorkingDirectory)/Deploy/HangFire'
zipAfterPublish: true
modifyOutputPath: true
displayName: 'Build HangFire deployment package'
# Publish API and HangFire as one artifact
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/Deploy'
artifactName: 'DIGNDB.App.SmitteStop'
displayName: 'Publish API and HangFire to one artifact'