Skip to content

Commit 8499136

Browse files
authored
Publish symbols using Microsoft.SymbolUploader.Build.Task package (dotnet#17463)
Added PB_SymbolExpirationInDays (settable at queue time), PB_MsdlSymbolServerPAT, PB_SymwebSymbolServerPAT variables. Added "msdl" (publish symbols to public Microsoft server) and "symweb" (publish symbols to symweb) variables to PB_PublishType. Update to version 1.0.0-beta-62806-01 of the symbol uploader. Issue #16482
1 parent 4eb8b37 commit 8499136

File tree

5 files changed

+157
-178
lines changed

5 files changed

+157
-178
lines changed

Diff for: buildpipeline/DotNet-Trusted-Publish-Symbols.json

+108-44
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,30 @@
4545
}
4646
},
4747
{
48+
"environment": {},
4849
"enabled": true,
4950
"continueOnError": false,
5051
"alwaysRun": false,
51-
"displayName": "Sync packages",
52+
"displayName": "Setup vs dev env",
53+
"timeoutInMinutes": 0,
54+
"task": {
55+
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
56+
"versionSpec": "1.*",
57+
"definitionType": "task"
58+
},
59+
"inputs": {
60+
"filename": "$(Pipeline.SourcesDirectory)\\setup_vs_tools.cmd",
61+
"arguments": "",
62+
"modifyEnvironment": "true",
63+
"workingFolder": "",
64+
"failOnStandardError": "false"
65+
}
66+
},
67+
{
68+
"enabled": true,
69+
"continueOnError": false,
70+
"alwaysRun": false,
71+
"displayName": "Sync symbol packages",
5272
"timeoutInMinutes": 0,
5373
"task": {
5474
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
@@ -57,51 +77,69 @@
5777
},
5878
"inputs": {
5979
"filename": "sync.cmd",
60-
"arguments": "-ab -AzureAccount=$(CloudDropAccountName) -AzureToken=$(CloudDropAccessToken) -Container=$(PB_ContainerName) -BlobNamePrefix=$(PB_BlobNamePrefix)$(PB_BuildType)/symbolpkg/ -- /p:DownloadFlatFiles=true /p:BlobNameExtension=\".nupkg\" /p:DownloadDirectory=$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(PB_BuildType)\\symbolpkg",
80+
"arguments": "-ab -AzureAccount=$(CloudDropAccountName) -AzureToken=$(CloudDropAccessToken) -Container=$(PB_ContainerName) -BlobNamePrefix=$(PB_BlobNamePrefix)$(ConfigurationGroup)/symbolpkg/ -- /p:DownloadFlatFiles=true /p:BlobNameExtension=\".nupkg\" /p:DownloadDirectory=$(AzureContainerSymbolPackageDirectory)symbolpkg",
6181
"workingFolder": "$(Pipeline.SourcesDirectory)",
6282
"failOnStandardError": "false"
6383
}
6484
},
6585
{
86+
"environment": {},
6687
"enabled": true,
6788
"continueOnError": false,
6889
"alwaysRun": false,
69-
"displayName": "Extract symbol packages",
90+
"displayName": "Symbol Packages -> Blob Feed",
7091
"timeoutInMinutes": 0,
92+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'blob'), eq(variables.ConfigurationGroup, 'Release'))",
7193
"task": {
72-
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
94+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
7395
"versionSpec": "1.*",
7496
"definitionType": "task"
7597
},
7698
"inputs": {
77-
"scriptType": "inlineScript",
78-
"scriptName": "",
79-
"arguments": "-BuildType $(PB_BuildType) -SymPkgGlob $(PB_AzureContainerSymbolPackageGlob) -Branch $(SourceBranch)",
99+
"filename": "msbuild",
100+
"arguments": "src\\publish.proj /v:D /t:PublishSymbolPackages /p:__PublishSymbols=true $(FeedPublishArguments) /fileloggerparameters:Verbosity=diag;LogFile=publishsympkg.log",
80101
"workingFolder": "$(Pipeline.SourcesDirectory)",
81-
"inlineScript": "param($BuildType, $SymPkgGlob, $Branch)\nif ($BuildType -ne \"Release\") { exit }\n\n.\\run.cmd build -- `\n/t:UnzipSymbolPackagesForPublish `\n/p:SymbolPackagesToPublishGlob=$SymPkgGlob `\n/v:D",
82-
"failOnStandardError": "true"
102+
"failOnStandardError": "false"
83103
}
84104
},
85105
{
106+
"environment": {},
86107
"enabled": true,
87108
"continueOnError": false,
88109
"alwaysRun": false,
89-
"displayName": "Publish Symbols to Artifact Services",
110+
"displayName": "Publish symbols to msdl",
90111
"timeoutInMinutes": 0,
112+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'msdl'), eq(variables.ConfigurationGroup, 'Release'))",
91113
"task": {
92-
"id": "29827cd1-5c33-4ff0-a817-abd46970ffc4",
93-
"versionSpec": "0.*",
114+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
115+
"versionSpec": "1.*",
94116
"definitionType": "task"
95117
},
96118
"inputs": {
97-
"symbolServiceURI": "https://microsoft.artifacts.visualstudio.com/DefaultCollection",
98-
"requestName": "$(system.teamProject)/$(Build.BuildNumber)/$(Build.BuildId)",
99-
"sourcePath": "$(Pipeline.SourcesDirectory)\\bin\\obj\\SymbolsRequest\\ExtractedPackages",
100-
"assemblyPath": "",
101-
"toLowerCase": "true",
102-
"detailedLog": "true",
103-
"expirationInDays": "30",
104-
"usePat": "false"
119+
"filename": "msbuild",
120+
"arguments": "src\\publish.proj /v:D /t:PublishAllSymbols $(FeedPublishArguments) /p:SymbolServerPath=$(PB_MsdlSymbolServerPath) /p:SymbolServerPAT=$(PB_MsdlSymbolServerPAT) /p:SymbolExpirationInDays=$(PB_SymbolExpirationInDays)",
121+
"workingFolder": "$(Pipeline.SourcesDirectory)",
122+
"failOnStandardError": "false"
123+
}
124+
},
125+
{
126+
"environment": {},
127+
"enabled": true,
128+
"continueOnError": false,
129+
"alwaysRun": false,
130+
"displayName": "Publish symbols to symweb",
131+
"timeoutInMinutes": 0,
132+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'symweb'), eq(variables.ConfigurationGroup, 'Release'))",
133+
"task": {
134+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
135+
"versionSpec": "1.*",
136+
"definitionType": "task"
137+
},
138+
"inputs": {
139+
"filename": "msbuild",
140+
"arguments": "src\\publish.proj /v:D /t:PublishAllSymbols $(FeedPublishArguments) /p:SymbolServerPath=$(PB_SymwebSymbolServerPath) /p:SymbolServerPAT=$(PB_SymwebSymbolServerPAT) /p:SymbolExpirationInDays=$(PB_SymbolExpirationInDays)",
141+
"workingFolder": "$(Pipeline.SourcesDirectory)",
142+
"failOnStandardError": "false"
105143
}
106144
},
107145
{
@@ -177,8 +215,8 @@
177215
"value": "false",
178216
"allowOverride": true
179217
},
180-
"PB_BuildType": {
181-
"value": "Release",
218+
"ConfigurationGroup": {
219+
"value": "$(PB_BuildType)",
182220
"allowOverride": true
183221
},
184222
"CloudDropAccountName": {
@@ -190,12 +228,25 @@
190228
"allowOverride": true,
191229
"isSecret": true
192230
},
193-
"OfficialBuildId": {
231+
"PB_ContainerName": {
194232
"value": "$(Build.BuildNumber)",
195233
"allowOverride": true
196234
},
197-
"Label": {
198-
"value": "$(Build.BuildNumber)",
235+
"PB_BlobNamePrefix": {
236+
"value": "$(PB_PipeBuildIdentifier)/",
237+
"allowOverride": true
238+
},
239+
"AzureBlobFeedAccountName": {
240+
"value": "dotnetfeed",
241+
"allowOverride": true
242+
},
243+
"AzureBlobFeedAccessToken": {
244+
"value": null,
245+
"allowOverride": true,
246+
"isSecret": true
247+
},
248+
"AzureBlobFeedContainerName": {
249+
"value": "dotnet-core",
199250
"allowOverride": true
200251
},
201252
"Pipeline.SourcesDirectory": {
@@ -215,6 +266,10 @@
215266
"value": null,
216267
"isSecret": true
217268
},
269+
"OfficialBuildId": {
270+
"value": "$(Build.BuildNumber)",
271+
"allowOverride": true
272+
},
218273
"SourceVersion": {
219274
"value": "master",
220275
"allowOverride": true
@@ -223,39 +278,48 @@
223278
"value": "master",
224279
"allowOverride": true
225280
},
281+
"AzureContainerSymbolPackageDirectory": {
282+
"value": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(ConfigurationGroup)\\",
283+
"allowOverride": true
284+
},
226285
"AzureContainerSymbolPackageGlob": {
227286
"value": "symbolpkg\\*.nupkg",
287+
},
288+
"FeedPublishArguments": {
289+
"value": "$(PB_BuildOutputManifestArguments) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:CloudDropAccessToken=$(PB_PublishBlobFeedKey) /p:CloudDropAccountName=$(AzureBlobFeedAccountName) /p:ContainerName=$(AzureBlobFeedContainerName) /p:OverwriteOnPublish=true /p:PackagesPatternDir=$(AzureContainerSymbolPackageDirectory) /p:__BuildType=$(ConfigurationGroup) /p:OfficialPublish=true /p:PublishFlatContainer=false"
290+
},
291+
"PB_PublishType": {
292+
"value": "",
228293
"allowOverride": true
229294
},
230-
"PB_AzureContainerSymbolPackageGlob": {
231-
"value": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(PB_BuildType)\\$(AzureContainerSymbolPackageGlob)",
295+
"PB_PublishBlobFeedUrl": {
296+
"value": "",
232297
"allowOverride": true
233298
},
234-
"PB_DotNetCoreShareDir": {
235-
"value": "passed-by-pipebuild",
299+
"PB_PublishBlobFeedKey": {
300+
"value": "",
236301
"allowOverride": true
237302
},
238-
"SymbolsProject": {
239-
"value": "CLR"
303+
"PB_BuildOutputManifestArguments": {
304+
"value": "/p:ManifestBuildId=$(OfficialBuildId) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion)"
240305
},
241-
"SymbolsStatusMail": {
242-
"value": "dagood;mawilkie"
306+
"PB_MsdlSymbolServerPath": {
307+
"value": "https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection"
243308
},
244-
"SymbolsUserName": {
245-
"value": "dlab"
309+
"PB_MsdlSymbolServerPAT": {
310+
"value": null,
311+
"isSecret": true
246312
},
247-
"SymbolsRelease": {
248-
"value": "rtm"
313+
"PB_SymwebSymbolServerPath": {
314+
"value": "https://microsoft.artifacts.visualstudio.com/DefaultCollection"
249315
},
250-
"SymbolsProductGroup": {
251-
"value": "Visual_Studio"
316+
"PB_SymwebSymbolServerPAT": {
317+
"value": null,
318+
"isSecret": true
252319
},
253-
"SymbolsProductName": {
254-
"value": "dotnetcore"
320+
"PB_SymbolExpirationInDays": {
321+
"value": "30"
255322
},
256-
"SymbolPublishDestinationDir": {
257-
"value": "$(PB_DotNetCoreShareDir)\\$(PB_VstsRepositoryName)\\$(Label)\\"
258-
}
259323
},
260324
"retentionRules": [
261325
{

0 commit comments

Comments
 (0)