forked from microsoft/MSBuildLocator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vsts-dotnet-ci.yml
106 lines (92 loc) · 2.62 KB
/
.vsts-dotnet-ci.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
95
96
97
98
99
100
101
102
103
104
105
106
pool:
name: Hosted VS2017
demands: msbuild
strategy:
matrix:
Debug:
BuildConfiguration: Debug
Release:
BuildConfiguration: Release
variables:
"Parameters.solution": MSBuildLocator.sln
SignType: Test
steps:
- task: UseDotNet@2
displayName: Use .NET Core SDK
inputs:
packageType: sdk
version: 2.1.503
- script: |
dotnet tool install --tool-path bin\tools nbgv
bin\tools\nbgv cloud -p src -a
displayName: Set version number
- task: MSBuild@1
displayName: Build and Pack
inputs:
solution: MSBuildLocator.sln
configuration: '$(BuildConfiguration)'
msbuildArguments: '/t:Pack;Build /restore'
createLogFile: true
- task: CopyFiles@2
displayName: Collect Symbols
inputs:
SourceFolder: 'src/MSBuildLocator'
Contents: '**\*.pdb'
TargetFolder: '$(Build.ArtifactStagingDirectory)/symbols'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
displayName: Upload Symbols
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/symbols'
ArtifactName: symbols
ArtifactType: Container
- task: CopyFiles@2
displayName: Collect Binaries
inputs:
SourceFolder: 'src/MSBuildLocator/bin'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/bin'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
displayName: Upload Binaries
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/bin'
ArtifactName: bin
ArtifactType: Container
- task: CopyFiles@2
displayName: Collect Packages
inputs:
SourceFolder: 'src/MSBuildLocator/bin/$(BuildConfiguration)'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)/pkg'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
displayName: Upload Packages
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/pkg'
ArtifactName: pkg
ArtifactType: Container
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
arguments: '--configuration $(BuildConfiguration) --no-build'
publishTestResults: true
- task: CopyFiles@2
displayName: Collect logs
condition: always()
inputs:
SourceFolder: ''
Contents: '**\*.log'
TargetFolder: '$(Build.ArtifactStagingDirectory)/logs'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
displayName: Upload Logs
condition: always()
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/logs'
ArtifactName: logs
ArtifactType: Container