-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvsbuild-template.yaml
More file actions
130 lines (121 loc) · 3.83 KB
/
Copy pathvsbuild-template.yaml
File metadata and controls
130 lines (121 loc) · 3.83 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
# Agent queue
queue: ""
# Job expansion
matrix:
- buildConfiguration: release
buildPlatform: any cpu
# Additional variables
variables: {}
# Restore
restoreSolution: "s/**/*.sln"
restoreNuGetVersion: 3.3.0
# Build
buildSolution: "s/**/*.sln"
buildArguments: ""
buildClean: false
buildVSVersion: 15.0
# Test
testPattern:
- "**/*test*.dll"
- "!**/obj/**"
testRoot: s
# Symbols
symbolsPattern: "**/bin/**/*.pdb"
symbolsRoot: s
symbolsStore: ""
symbolsSkipIndex: false
symbolsWarnIfNotIndexed: false
# Stage and publish drop
copyPattern:
- "**"
copyRoot: s
dropStagingPath: "$(Build.ArtifactStagingDirectory)"
dropArtifactName: "drop-$(BuildConfiguration)-$(BuildPlatform)"
dropType: Container # Container or FilePath
dropPath: "" # Only required if FilePath
---
# Self repo
resources:
- name: s
type: self
phases:
- name: "VS Build"
target:
type: queue
name: {{queue}}
jobs:
{{#matrix}}
- name: "build-{{buildConfiguration}}-{{buildPlatform}}"
variables:
- name: BuildConfiguration
value: "{{buildConfiguration}}"
- name: BuildPlatform
value: "{{buildPlatform}}"
{{#each @root.variables}}
- name: "{{@key}}"
value: "{{this}}"
{{/each}}
steps:
- phase: preRestore
- phase: restore
steps:
- task: NuGetInstaller@1
inputs:
solution: "{{@root.restoreSolution}}"
restoreMode: restore
nuGetVersion: "{{@root.restoreNuGetVersion}}"
- phase: postRestore
- phase: preBuild
- phase: build
steps:
- task: VSBuild@1
inputs:
solution: "{{@root.buildSolution}}"
msbuildArgs: "{{@root.buildArguments}}"
configuration: "{{buildConfiguration}}"
platform: "{{buildPlatform}}"
clean: "{{@root.buildClean}}"
vsVersion: "{{@root.buildVSVersion}}"
msbuildArchitecture: x86
logProjectEvents: false
createLogFile: false
- phase: postBuild
- phase: preTest
- phase: test
steps:
- task: VSTest@1
inputs:
testAssemblyVer2: "{{#each @root.testPattern}}{{#unless @first}}\n{{/unless}}{{this}}{{/each}}"
searchFolder: "{{@root.testRoot}}"
configuration: "{{buildConfiguration}}"
platform: "{{buildPlatform}}"
- phase: postTest
- phase: preSymbols
- phase: symbols
steps:
- task: PublishSymbols@1
inputs:
SearchPattern: "{{@root.symbolsPattern}}"
SymbolsFolder: "{{@root.symbolsRoot}}"
SymbolsPath: "{{@root.symbolsStore}}"
SkipIndexing: "{{@root.symbolsSkipIndex}}"
TreatNotIndexedAsWarning: "{{@root.symbolsWarnIfNotIndexed}}"
SymbolsArtifactName: "Symbols_{{buildConfiguration}}_{{buildPlatform}}"
- phase: postSymbols
- phase: preDrop
- phase: drop
steps:
- task: CopyFiles@2
inputs:
Contents: "{{#each @root.copyPattern}}{{#unless @first}}\n{{/unless}}{{this}}{{/each}}"
SourceFolder: "{{@root.copyRoot}}"
TargetFolder: "{{@root.dropStagingPath}}"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "{{@root.dropStagingPath}}"
ArtifactName: "{{@root.dropArtifactName}}"
ArtifactType: "{{@root.dropType}}"
TargetPath: "{{@root.dropPath}}"
- phase: postDrop
{{/matrix}}