-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
68 lines (58 loc) · 1.92 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 Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/vsts/pipelines/apps/windows/dot-net
pool:
vmImage: 'VS2017-Win2016'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
trigger:
branches:
include:
- refs/heads/*
- refs/tags/*
steps:
- task: GitVersion@3
displayName: 'Run GitVersion'
- task: BatchScript@1
displayName: 'Print Env Variables'
inputs:
filename: 'C:\Windows\System32\cmd.exe'
arguments: '/c set'
- task: NuGetToolInstaller@0
displayName: 'Install NuGet Tool'
- task: NuGetCommand@2
displayName: 'Restore NuGet Packages'
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
displayName: 'Compile Solution'
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\*test*.dll
**\$(BuildConfiguration)\**\*test*.dll
!**\*Microsoft.VisualStudio.TestPlatform*
!**\obj\**
vstestLocationMethod: 'location'
vstestLocation: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\'
codeCoverageEnabled: True
otherConsoleOptions: '/platform:x64 /Framework:.NETCoreApp,Version=v2.1 /logger:console;verbosity="normal" '
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Publish Service'
inputs:
command: 'publish'
publishWebProjects: 'False'
projects: '$(Build.SourcesDirectory)\TFSLabelTagNotification\TFSLabelTagNotification.csproj'
configuration: '$(buildConfiguration)'
packDirectory: '$(Build.ArtifactStagingDirectory)'
workingDirectory: '$(Build.SourcesDirectory)\TFSLabelTagNotification'