-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
azure-pipelines-official.yml
201 lines (175 loc) · 7.29 KB
/
azure-pipelines-official.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
resources:
- repo: self
clean: true
queue:
name: VSEng-MicroBuildVS2017
timeoutInMinutes: 360
demands:
- msbuild
- visualstudio
- DotNetFramework
variables:
BuildPlatform: 'Any CPU'
InsertTargetBranchFullName: 'lab/d16.0stg'
InsertTargetBranchShortName: 'd16.0stg'
steps:
- task: NuGetCommand@2
inputs:
command: custom
arguments: 'locals all -clear'
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
inputs:
signType: real
condition: and(succeeded(), in(variables['PB_SignType'], 'test', 'real'))
- task: ms-vseng.MicroBuildTasks.965C8DC6-1483-45C9-B384-5AC75DA1F1A4.MicroBuildOptProfPlugin@1
inputs:
skipRunOptimize: true
displayName: 'Install OptProf Plugin'
- task: ms-vseng.MicroBuildTasks.32f78468-e895-4f47-962c-58a699361df8.MicroBuildSwixPlugin@1
inputs:
feedSource: 'https://devdiv-test.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json'
- task: NuGetRestore@1
inputs:
solution: 'build\ToolsetPackages\InternalToolset.csproj'
feed: '8f470c7e-ac49-4afe-a6ee-cf784e438b93'
- task: CmdLine@1
displayName: Create output directory
inputs:
filename: mkdir
arguments: 'Binaries\$(BuildConfiguration)'
- script: build\scripts\cibuild.cmd
-configuration $(BuildConfiguration) -official -testDesktop -procdump
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=$(PB_SignType)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
displayName: Build
condition: succeeded()
- task: PowerShell@2
displayName: Publish Assets
inputs:
arguments: '-config $(BuildConfiguration) -branchName "$(Build.SourceBranch)" -mygetApiKey $(Roslyn.MyGetApiKey) -nugetApiKey $(Roslyn.NuGetApiKey) -gitHubUserName $(Roslyn.GitHubUserName) -gitHubToken $(Roslyn.GitHubToken) -gitHubEmail $(Roslyn.GitHubEmail)'
filePath: 'build\scripts\publish-assets.ps1'
condition: succeeded()
### BEGIN OPTPROF TASKS ###
# Publish optprof configuration files
- task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0
inputs:
dropServiceURI: 'https://devdiv.artifacts.visualstudio.com'
buildNumber: 'ProfilingInputs/DevDiv/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildId)'
sourcePath: '$(Build.SourcesDirectory)\Binaries\$(BuildConfiguration)\DevDivInsertionFiles\OptProf'
toLowerCase: false
usePat: false
displayName: 'OPTPROF - Publish to Artifact Services - ProfilingInputs'
condition: succeededOrFailed()
# Created a exe that will install visual studio with this version
- task: PowerShell@2
inputs:
filePath: build\scripts\setmanifestpaths.ps1
failOnStderr: true
displayName: 'OPTPROF - Set VSTS variables for vsman files'
condition: succeededOrFailed()
- task: ms-vseng.MicroBuildTasks.0e9d0d4d-71ec-4e4e-ae40-db9896f1ae74.MicroBuildBuildVSBootstrapper@1
inputs:
vsMajorVersion: 16
channelName: int.$(InsertTargetBranchShortName)
manifests: $(SetupManifests)
outputFolder: '$(Build.SourcesDirectory)\Binaries\VSSetup\$(BuildConfiguration)\Insertion'
displayName: 'OPTPROF - Build VS bootstrapper'
condition: succeededOrFailed()
# Publish run settings
- task: PowerShell@2
inputs:
filePath: build\scripts\createrunsettings.ps1
arguments: -release
failOnStderr: true
displayName: 'OPTPROF - generate runsettings file'
condition: succeededOrFailed()
# Publish bootstrapper info
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.StagingDirectory)\MicroBuild\Output
ArtifactName: MicroBuildOutputs
ArtifactType: Container
displayName: 'OPTPROF - Publish Artifact: MicroBuildOutputs'
condition: succeededOrFailed()
# Publish scripts to get the branch of VS that this inserts into
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\$(BuildConfiguration)\DevDivInsertionFiles\BranchInfo'
ArtifactName: BranchInfo
ArtifactType: Container
displayName: 'OPTPROF - Publish Artifact: BranchInfo'
condition: succeededOrFailed()
### END OPTPROF TASKS ###
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\$(BuildConfiguration)\Logs'
ArtifactName: 'Build Diagnostic Files'
publishLocation: Container
continueOnError: true
condition: succeededOrFailed()
- task: PublishTestResults@1
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)\Binaries\TestResults\$(BuildConfiguration)\*.xml'
mergeTestResults: true
testRunTitle: 'Unit Tests'
condition: succeededOrFailed()
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
displayName: Upload VSTS Drop
inputs:
DropFolder: 'Binaries\VSSetup\$(BuildConfiguration)\Insertion'
condition: succeeded()
- task: NuGetCommand@2
displayName: NuGet CoreXT publish
inputs:
command: push
feedsToUse: config
packagesToPush: '$(Build.SourcesDirectory)\Binaries\$(BuildConfiguration)\DevDivPackages\**\*.nupkg'
publishVstsFeed: '97a41293-2972-4f48-8c0e-05493ae82010'
allowPackageConflicts: true
condition: succeeded()
# Publish VSTS artifact that the RoslynInsertionTool is able to find by its name.
# The backing storage of the artifact is a file share.
#
# The bulk of the publish work is done by the Powershell task below. This exists to create
# the proper entries in the build log so that the insertion tool can find the drop that
# needs to get published
- task: PublishBuildArtifacts@1
displayName: Publish Drop - DevDivInsertionFiles
inputs:
PathtoPublish: 'Binaries\$(BuildConfiguration)\DevDivInsertionFiles'
ArtifactName: '$(Build.BuildNumber)'
publishLocation: FilePath
TargetPath: '$(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)'
Parallel: true
ParallelCount: 64
condition: succeededOrFailed()
# Archive the files from the build necessary for future investigations
- task: PowerShell@2
displayName: Publish Drop - Binaries
inputs:
arguments: '-Source Binaries\$(BuildConfiguration) -Target $(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)\$(Build.BuildNumber) -ParallelCount 8 -Exclude UnitTests,PerfTests'
filePath: 'build\scripts\vsts-robocopy.ps1'
condition: succeededOrFailed()
# Copy additional files to the drop directory
- task: PowerShell@2
displayName: Publish Drop - VSSetup
inputs:
arguments: '-Source Binaries\VSSetup\$(BuildConfiguration)\Insertion -Target $(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)\$(Build.BuildNumber)\Insertion -ParallelCount 8'
filePath: 'build\scripts\vsts-robocopy.ps1'
condition: succeededOrFailed()
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Perform Cleanup Tasks
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: Publish MicroBuild Outputs
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\MicroBuild\Output'
ArtifactName: '$(Build.BuildNumber)'
publishLocation: FilePath
TargetPath: '$(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)'
condition: succeededOrFailed()