-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
74 lines (64 loc) · 2.31 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
69
70
71
72
73
74
pool:
vmImage: 'VS2017-Win2016'
variables:
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: 'Install NBGV tool'
inputs:
command: custom
custom: tool
arguments: 'install --tool-path . nbgv'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- script: 'nbgv cloud'
displayName: 'Set Version'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '-c $(BuildConfiguration) --collect:"Code Coverage" -s $(System.DefaultWorkingDirectory)/CodeCoverage.runsettings /p:DebugType=Full'
#- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@5
# displayName: 'Build Quality'
# inputs:
# runTitle: 'Build Quality'
# checkWarnings: true
# warningFailOption: fixed
# warningThreshold: 0
# checkCoverage: true
# coverageFailOption: fixed
# coverageThreshold: 80
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# - task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1
# displayName: 'ReSharper Code Quality'
# inputs:
# SolutionOrProjectPath: Commands.sln
# FailBuildOnCodeIssues: false
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: DotNetCoreCLI@2
displayName: Pack
inputs:
command: pack
packagesToPack: >-
DreamNucleus.Commands/DreamNucleus.Commands.csproj;
DreamNucleus.Commands.Autofac/DreamNucleus.Commands.Autofac.csproj;
DreamNucleus.Commands.Extensions/DreamNucleus.Commands.Extensions.csproj;
DreamNucleus.Commands.Extensions.Redis/DreamNucleus.Commands.Extensions.Redis.csproj
nobuild: true
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
ArtifactName: Drop
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))