-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
94 lines (80 loc) · 2.5 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
pool:
name: Default
variables:
BuildConfiguration: 'release'
Verbosity: 'normal'
GitVersion.Version: '5.1.3'
Nuget.Version: '5.4.0'
Nuget.Feed: '0b83b6f8-46a0-4915-b8a6-55079d7dd76b'
steps:
# Install Required Tools
- task: NuGetToolInstaller@0
displayName: 'Use NuGet $(Nuget.Version)'
inputs:
versionSpec: $(Nuget.Version)
- task: NuGetCommand@2
displayName: 'Install GitVersion $(GitVersion.Version)'
inputs:
command: custom
arguments: install GitVersion.CommandLine -Version $(GitVersion.Version) -OutputDirectory $(Build.BinariesDirectory)/tools -ExcludeVersion
- script: powershell $(Build.BinariesDirectory)/tools/GitVersion.CommandLine/tools/GitVersion.exe /output buildserver /nofetch
- task: UseDotNet@2
displayName: 'Use latest .NET Core 3.x SDK'
inputs:
packageType: sdk
version: 3.x
installationPath: $(Agent.ToolsDirectory)/dotnet
# Build system configuration
- task: DotNetCoreCLI@2
displayName: 'dotnet info'
inputs:
command: custom
custom: '--info'
- task: DotNetCoreCLI@2
displayName: 'dotnet version'
inputs:
command: custom
custom: '--version'
# Build the solution
- task: NuGetCommand@2
displayName: 'NuGet Restore'
inputs:
command: 'restore'
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: build
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration) /p:langversion=latest /p:Version=$(GitVersion.NuGetVersion) /p:SourceLinkCreate=true -v $(verbosity) --no-restore'
- task: DotNetCoreCLI@2
displayName: 'Run Tests'
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(BuildConfiguration) -v $(verbosity) --no-build'
# Publish Artifacts
- task: DotNetCoreCLI@2
displayName: 'Publish ConsoleApp'
inputs:
command: publish
publishWebProjects: false
projects: '**/*DSAA.ConsoleApp.csproj'
arguments: '--configuration $(BuildConfiguration) -v $(verbosity) --no-build --output $(Build.StagingDirectory)/console'
zipAfterPublish: true
- task: CopyFiles@2
displayName: 'Prepare NuGet packages for Publishing'
inputs:
Contents: '**/*.nupkg'
TargetFolder: '$(Build.StagingDirectory)/packages'
CleanTargetFolder: true
OverWrite: true
FlattenFolders: true
- task: PublishSymbols@2
displayName: 'Publish Symbols'
inputs:
SymbolServerType: TeamServices
# SearchPattern: '**/bin**/*.pdb'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
PathtoPublish: $(Build.StagingDirectory)