Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ec612bc

Browse files
author
Mike McLaughlin
committed
Publish symbols using Microsoft.SymbolUploader.Build.Task package
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. There was a little cleanup of the build def variable names between publish and symbol publish and between corefx and coreclr. Issue #27343
1 parent a3794b5 commit ec612bc

8 files changed

+152
-249
lines changed

buildpipeline/DotNet-CoreFx-Trusted-Windows-NoTest.json

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -184,31 +184,6 @@
184184
"failOnStandardError": "false"
185185
}
186186
},
187-
{
188-
"environment": {},
189-
"enabled": true,
190-
"continueOnError": false,
191-
"alwaysRun": false,
192-
"displayName": "Index symbol sources",
193-
"timeoutInMinutes": 0,
194-
"refName": "Task11",
195-
"task": {
196-
"id": "0675668a-7bba-4ccb-901d-5ad6554ca653",
197-
"versionSpec": "1.*",
198-
"definitionType": "task"
199-
},
200-
"inputs": {
201-
"SymbolsPath": "",
202-
"SearchPattern": "corefx\\bin\\*$(PB_Platform).$(PB_ConfigurationGroup)\\**\\*.pdb",
203-
"SymbolsFolder": "",
204-
"SkipIndexing": "false",
205-
"TreatNotIndexedAsWarning": "false",
206-
"SymbolsMaximumWaitTime": "",
207-
"SymbolsProduct": "",
208-
"SymbolsVersion": "",
209-
"SymbolsArtifactName": "Symbols_$(PB_ConfigurationGroup)"
210-
}
211-
},
212187
{
213188
"environment": {},
214189
"enabled": true,
@@ -516,4 +491,4 @@
516491
"revision": 418098432,
517492
"visibility": "organization"
518493
}
519-
}
494+
}

buildpipeline/DotNet-CoreFx-Trusted-Windows.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -235,31 +235,6 @@
235235
"failOnStandardError": "false"
236236
}
237237
},
238-
{
239-
"environment": {},
240-
"enabled": true,
241-
"continueOnError": false,
242-
"alwaysRun": false,
243-
"displayName": "Index symbol sources",
244-
"timeoutInMinutes": 0,
245-
"refName": "Task13",
246-
"task": {
247-
"id": "0675668a-7bba-4ccb-901d-5ad6554ca653",
248-
"versionSpec": "1.*",
249-
"definitionType": "task"
250-
},
251-
"inputs": {
252-
"SymbolsPath": "",
253-
"SearchPattern": "corefx\\bin\\*$(PB_Platform).$(PB_ConfigurationGroup)\\**\\*.pdb",
254-
"SymbolsFolder": "",
255-
"SkipIndexing": "false",
256-
"TreatNotIndexedAsWarning": "false",
257-
"SymbolsMaximumWaitTime": "",
258-
"SymbolsProduct": "",
259-
"SymbolsVersion": "",
260-
"SymbolsArtifactName": "Symbols_$(PB_ConfigurationGroup)"
261-
}
262-
},
263238
{
264239
"environment": {},
265240
"enabled": true,

buildpipeline/DotNet-Trusted-Publish-Symbols.json

Lines changed: 97 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"build": [
3+
{
4+
"enabled": true,
5+
"continueOnError": false,
6+
"alwaysRun": false,
7+
"displayName": "Run script $(VS140COMNTOOLS)\\VsDevCmd.bat",
8+
"timeoutInMinutes": 0,
9+
"task": {
10+
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
11+
"versionSpec": "1.*",
12+
"definitionType": "task"
13+
},
14+
"inputs": {
15+
"filename": "$(VS140COMNTOOLS)\\VsDevCmd.bat",
16+
"arguments": "",
17+
"modifyEnvironment": "true",
18+
"workingFolder": "",
19+
"failOnStandardError": "false"
20+
}
21+
},
322
{
423
"enabled": true,
524
"continueOnError": false,
@@ -24,7 +43,7 @@
2443
"enabled": true,
2544
"continueOnError": false,
2645
"alwaysRun": false,
27-
"displayName": "sync -ab",
46+
"displayName": "Sync packages",
2847
"timeoutInMinutes": 0,
2948
"task": {
3049
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
@@ -36,52 +55,70 @@
3655
"scriptName": "",
3756
"arguments": "$(PB_CloudDropAccountName) $(CloudDropAccessToken) $(PB_Label)",
3857
"workingFolder": "$(Pipeline.SourcesDirectory)",
39-
"inlineScript": "param($account, $token, $container)\n.\\sync.cmd -ab -- /p:CloudDropAccountName=$account /p:CloudDropAccessToken=$token /p:ContainerName=$container",
58+
"inlineScript": "param($account, $token, $container)\n.\\sync.cmd -ab -- /v:D /p:CloudDropAccountName=$account /p:CloudDropAccessToken=$token /p:ContainerName=$container",
4059
"failOnStandardError": "false"
4160
}
4261
},
4362
{
63+
"environment": {},
4464
"enabled": true,
4565
"continueOnError": false,
4666
"alwaysRun": false,
47-
"displayName": "Extract symbol packages; if release branch, archive",
67+
"displayName": "symbol packages -> Blob Feed",
4868
"timeoutInMinutes": 0,
69+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'blob'), eq(variables.PB_ConfigurationGroup, 'Release'))",
4970
"task": {
50-
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
71+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
5172
"versionSpec": "1.*",
5273
"definitionType": "task"
5374
},
5475
"inputs": {
55-
"scriptType": "inlineScript",
56-
"scriptName": "",
57-
"arguments": "-ConfigGroup $(PB_ConfigurationGroup) -SymPkgGlob $(PB_AzureContainerSymbolPackageGlob) -Branch $(SourceBranch)",
76+
"filename": "msbuild",
77+
"arguments": "src\\publish.proj /t:PublishSymbolsToAzureBlobFeed /p:PublishSymbols=\"true\" $(FeedPublishArguments)",
5878
"workingFolder": "$(Pipeline.SourcesDirectory)",
59-
"inlineScript": "param($ConfigGroup, $SymPkgGlob, $Branch)\nif ($ConfigGroup -ne \"Release\") { exit }\n$archive = $Branch.StartsWith(\"release/\")\n\n$target = \"GetAllSymbolFilesToPublish\"\nif ($archive) { $target = \"SubmitSymbolsRequest\" }\n\n.\\build-managed.cmd -- `\n/t:$target `\n/p:SkipCreateWindowsPdbsFromPortablePdbs=true `\n/p:SymbolPackagesToPublishGlob=$SymPkgGlob `\n/p:ArchiveSymbols=$archive `\n/v:D",
60-
"failOnStandardError": "true"
79+
"failOnStandardError": "false"
6180
}
6281
},
6382
{
83+
"environment": {},
6484
"enabled": true,
6585
"continueOnError": false,
6686
"alwaysRun": false,
67-
"displayName": "Publish Symbols to Artifact Services",
87+
"displayName": "Publish symbols to msdl",
6888
"timeoutInMinutes": 0,
89+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'msdl'), eq(variables.PB_ConfigurationGroup, 'Release'))",
6990
"task": {
70-
"id": "29827cd1-5c33-4ff0-a817-abd46970ffc4",
71-
"versionSpec": "0.*",
91+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
92+
"versionSpec": "1.*",
7293
"definitionType": "task"
7394
},
7495
"inputs": {
75-
"symbolServiceURI": "https://microsoft.artifacts.visualstudio.com/DefaultCollection",
76-
"requestName": "$(system.teamProject)/$(Build.BuildNumber)/$(Build.BuildId)",
77-
"sourcePath": "$(Pipeline.SourcesDirectory)\\bin\\obj\\SymbolsRequest\\ExtractedPackages",
78-
"assemblyPath": "",
79-
"toLowerCase": "true",
80-
"detailedLog": "true",
81-
"expirationInDays": "30",
82-
"usePat": "false"
96+
"filename": "msbuild",
97+
"arguments": "src\\publish.proj /v:D /t:PublishAllSymbols /p:SymbolServerPath=$(PB_MsdlSymbolServerPath) /p:SymbolServerPAT=$(PB_MsdlSymbolServerPAT) /p:SymbolExpirationInDays=$(PB_SymbolExpirationInDays) $(FeedPublishArguments)",
98+
"workingFolder": "$(Pipeline.SourcesDirectory)",
99+
"failOnStandardError": "false"
83100
}
84-
}
101+
},
102+
{
103+
"environment": {},
104+
"enabled": true,
105+
"continueOnError": false,
106+
"alwaysRun": false,
107+
"displayName": "Publish symbols to symweb",
108+
"timeoutInMinutes": 0,
109+
"condition": "and(succeeded(), contains(variables.PB_PublishType, 'symweb'), eq(variables.PB_ConfigurationGroup, 'Release'))",
110+
"task": {
111+
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
112+
"versionSpec": "1.*",
113+
"definitionType": "task"
114+
},
115+
"inputs": {
116+
"filename": "msbuild",
117+
"arguments": "src\\publish.proj /v:D /t:PublishAllSymbols /p:SymbolServerPath=$(PB_SymwebSymbolServerPath) /p:SymbolServerPAT=$(PB_SymwebSymbolServerPAT) /p:SymbolExpirationInDays=$(PB_SymbolExpirationInDays) $(FeedPublishArguments)",
118+
"workingFolder": "$(Pipeline.SourcesDirectory)",
119+
"failOnStandardError": "false"
120+
}
121+
},
85122
],
86123
"options": [
87124
{
@@ -132,7 +169,7 @@
132169
"allowOverride": true
133170
},
134171
"PB_ConfigurationGroup": {
135-
"value": "Debug",
172+
"value": "Release",
136173
"allowOverride": true
137174
},
138175
"PB_CloudDropAccountName": {
@@ -141,28 +178,21 @@
141178
},
142179
"CloudDropAccessToken": {
143180
"value": null,
144-
"allowOverride": true,
145181
"isSecret": true
146182
},
147-
"OfficialBuildId": {
148-
"value": "$(Build.BuildNumber)",
149-
"allowOverride": true
150-
},
151183
"PB_Label": {
152184
"value": "$(Build.BuildNumber)",
153185
"allowOverride": true
154186
},
155-
"PB_BuildConfiguration": {
156-
"value": "release"
157-
},
158-
"PB_BuildPlatform": {
159-
"value": "any cpu"
187+
"PB_BlobNamePrefix": {
188+
"value": "$(PB_PipeBuildIdentifier)/",
189+
"allowOverride": true
160190
},
161191
"Pipeline.SourcesDirectory": {
162192
"value": "$(Build.BinariesDirectory)\\pipelineRepository"
163193
},
164194
"PB_VstsAccountName": {
165-
"value": "dagood"
195+
"value": "dn-bot"
166196
},
167197
"PB_VstsRepositoryName": {
168198
"value": "DotNet-CoreFX-Trusted",
@@ -175,6 +205,14 @@
175205
"value": null,
176206
"isSecret": true
177207
},
208+
"AzureContainerSymbolPackageDirectory": {
209+
"value": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(PB_ConfigurationGroup)\\symbols",
210+
"allowOverride": true
211+
},
212+
"OfficialBuildId": {
213+
"value": "$(Build.BuildNumber)",
214+
"allowOverride": true
215+
},
178216
"SourceVersion": {
179217
"value": "master",
180218
"allowOverride": true
@@ -183,35 +221,40 @@
183221
"value": "master",
184222
"allowOverride": true
185223
},
186-
"PB_AzureContainerSymbolPackageGlob": {
187-
"value": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(PB_ConfigurationGroup)\\symbols\\*.nupkg",
188-
"allowOverride": true
224+
"FeedPublishArguments": {
225+
"value": "$(PB_BuildOutputManifestArguments) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:ConfigurationGroup=$(PB_ConfigurationGroup)"
189226
},
190-
"PB_DotNetCoreShareDir": {
191-
"value": "passed-by-pipebuild",
227+
"PB_PublishBlobFeedUrl": {
228+
"value": "",
192229
"allowOverride": true
193230
},
194-
"SymbolsProject": {
195-
"value": "CLR"
231+
"PB_PublishBlobFeedKey": {
232+
"value": null,
233+
"isSecret": true
196234
},
197-
"SymbolsStatusMail": {
198-
"value": "dagood;mawilkie"
235+
"PB_PublishType": {
236+
"value": ""
199237
},
200-
"SymbolsUserName": {
201-
"value": "dlab"
238+
"PB_BuildOutputManifestArguments": {
239+
"value": "/p:ManifestBuildId=$(OfficialBuildId) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion)"
202240
},
203-
"SymbolsRelease": {
204-
"value": "rtm"
241+
"PB_MsdlSymbolServerPath": {
242+
"value": "https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection"
205243
},
206-
"SymbolsProductGroup": {
207-
"value": "Visual_Studio"
244+
"PB_MsdlSymbolServerPAT": {
245+
"value": null,
246+
"isSecret": true
208247
},
209-
"SymbolsProductName": {
210-
"value": "dotnetcore"
248+
"PB_SymwebSymbolServerPath": {
249+
"value": "https://microsoft.artifacts.visualstudio.com/DefaultCollection"
250+
},
251+
"PB_SymwebSymbolServerPAT": {
252+
"value": null,
253+
"isSecret": true
254+
},
255+
"PB_SymbolExpirationInDays": {
256+
"value": "30"
211257
},
212-
"SymbolPublishDestinationDir": {
213-
"value": "$(PB_DotNetCoreShareDir)\\$(PB_VstsRepositoryName)\\$(PB_Label)\\"
214-
}
215258
},
216259
"retentionRules": [
217260
{
@@ -273,4 +316,4 @@
273316
"state": "wellFormed",
274317
"revision": 418097642
275318
}
276-
}
319+
}

0 commit comments

Comments
 (0)