-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish symbols using release pipelines #2407
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<!-- | ||
This MSBuild file is intended to be used as the body of the default | ||
publishing release pipeline. The release pipeline will use this file | ||
to invoke the PublishSymbols tasks to publish symbols to MSDL and SymWeb. | ||
|
||
Parameters: | ||
|
||
- PDBArtifactsDirectory : Full path to directory containing PDB files to be published. | ||
- BlobBasePath : Full path containing *.symbols.nupkg packages to be published. | ||
- DotNetSymbolServerTokenMsdl : PAT to access MSDL. | ||
- DotNetSymbolServerTokenSymWeb : PAT to access SymWeb. | ||
- DotNetSymbolExpirationInDays : Expiration days for published packages. Default is 3650. | ||
--> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(NuGetPackageRoot)microsoft.symboluploader.build.task\$(SymbolUploaderVersion)\build\PublishSymbols.targets" /> | ||
|
||
<Target Name="PublishSymbols"> | ||
<ItemGroup> | ||
<FilesToPublishToSymbolServer Include="$(PDBArtifactsDirectory)\*.pdb"/> | ||
<PackagesToPublishToSymbolServer Include="$(BlobBasePath)\*.symbols.nupkg"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays> | ||
<PublishToSymbolServer>true</PublishToSymbolServer> | ||
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer> | ||
</PropertyGroup> | ||
|
||
<Message | ||
Importance="High" | ||
Text="No symbol package(s) were found to publish." | ||
Condition="$(PublishToSymbolServer) == false" /> | ||
|
||
<!-- Symbol Uploader: MSDL --> | ||
<Message Importance="High" Text="Publishing symbol packages to MSDL ..." Condition="$(PublishToSymbolServer)" /> | ||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)" | ||
FilesToPublish="@(FilesToPublishToSymbolServer)" | ||
PersonalAccessToken="$(DotNetSymbolServerTokenMsdl)" | ||
SymbolServerPath="https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection" | ||
ExpirationInDays="$(DotNetSymbolExpirationInDays)" | ||
VerboseLogging="true" | ||
DryRun="false" | ||
ConvertPortablePdbsToWindowsPdbs="false" | ||
PdbConversionTreatAsWarning="" | ||
Condition="$(PublishToSymbolServer)"/> | ||
|
||
<!-- | ||
Symbol Uploader: SymWeb | ||
Watson, VS insertion testings and the typical internal dev usage require SymWeb. | ||
Currently we need to call the task twice (https://github.com/dotnet/core-eng/issues/3489). | ||
--> | ||
<Message Importance="High" Text="Publishing symbol packages to SymWeb ..." Condition="$(PublishToSymbolServer)" /> | ||
<PublishSymbols PackagesToPublish="@(PackagesToPublishToSymbolServer)" | ||
FilesToPublish="@(FilesToPublishToSymbolServer)" | ||
PersonalAccessToken="$(DotNetSymbolServerTokenSymWeb)" | ||
SymbolServerPath="https://microsoft.artifacts.visualstudio.com/DefaultCollection" | ||
ExpirationInDays="$(DotNetSymbolExpirationInDays)" | ||
VerboseLogging="true" | ||
DryRun="false" | ||
ConvertPortablePdbsToWindowsPdbs="false" | ||
JohnTortugo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
PdbConversionTreatAsWarning="" | ||
Condition="$(PublishToSymbolServer)"/> | ||
</Target> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SymbolUploader.Build.Task" Version="$(SymbolUploaderVersion)" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these SDK projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked with @tmat. He said to leave it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't read most of the comments in this PR, and this has probably been discussed elsewhere; but this still feels like abusing the system to be distributing these projects via eng/common files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmat has made that observation before. A more immediate solution would be to move these files to somewhere under the SDK. I've an issue to track that: #2371 I discussed a long term solution yesterday with @tmat and he shared some nice ideas. I need to put them on an issue, though.
That being said I'd love to hear more about the direction this should take. I'll ping you later or if you prefer plz post them here.