Skip to content
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

Excluding symbols in SymbolsPublishingExclusion.txt to publish to symbol server #7733

Merged
merged 45 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
dc4001f
symbols test
epananth May 20, 2021
3962338
test-sdk
epananth May 20, 2021
d972aa0
test path
epananth May 20, 2021
34b1862
Test
epananth May 22, 2021
7d529ec
test sdk
epananth May 22, 2021
685a8fb
revert test changes
epananth May 22, 2021
dc69764
Merge branch 'main' of https://github.com/dotnet/arcade into excludeS…
epananth May 22, 2021
57bc896
test
epananth Jun 2, 2021
70610b0
test
epananth Jun 2, 2021
a802f7a
Test
epananth Jun 3, 2021
68b8694
merge conflict
epananth Jun 8, 2021
0ac2301
Test symbols download
epananth Jun 9, 2021
9cf085c
fix
epananth Jun 9, 2021
13fbcfd
fix
epananth Jun 9, 2021
a008035
Test
epananth Jun 9, 2021
f645083
Test
epananth Jun 9, 2021
8a660b9
Test
epananth Jun 11, 2021
852c836
test
epananth Jun 24, 2021
599344d
Merge branch 'main' of https://github.com/dotnet/arcade into excludeS…
epananth Jul 29, 2021
5759cb1
test
epananth Jul 29, 2021
055cbc3
test
epananth Jul 29, 2021
ed7539b
test
epananth Jul 30, 2021
3802501
TEst
epananth Jul 30, 2021
4967e16
test
epananth Jul 30, 2021
40e4c5b
Merge branch 'main' of https://github.com/dotnet/arcade into excludeS…
epananth Jul 30, 2021
6a369ef
updated
epananth Jul 31, 2021
f6f6ec6
test
epananth Aug 2, 2021
faba61e
Test
epananth Aug 3, 2021
63c1c9e
Test
epananth Aug 3, 2021
b58987e
typo
epananth Aug 3, 2021
7fdedd8
test
epananth Aug 3, 2021
3a043b4
Test
epananth Aug 3, 2021
6fd3a3f
test variable
epananth Aug 3, 2021
f40d540
check if file exists
epananth Aug 3, 2021
1354def
minor fixes
epananth Aug 4, 2021
c5a73f7
Revert test changes
epananth Aug 4, 2021
7e4e1d7
Review comments
epananth Aug 4, 2021
11c6e18
default value
epananth Aug 4, 2021
1c81853
fix
epananth Aug 4, 2021
055c610
use this in the right place
epananth Aug 4, 2021
f3893f8
Test sdk
epananth Aug 10, 2021
8a38e89
minor fix to unblock runtime
epananth Aug 10, 2021
887eeaf
Revert test changes
epananth Aug 10, 2021
6843418
revert
epananth Aug 10, 2021
1ad6f11
merge main
epananth Aug 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,31 @@ jobs:
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt'
PublishLocation: Container
ArtifactName: ReleaseConfigs


- task: powershell@2
displayName: Check if SymbolPublishingExclusionsFile.txt exists
inputs:
targetType: inline
script: |
$symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt"
if(Test-Path -Path $symbolExclusionfile)
{
Write-Host "SymbolExclusionFile exists"
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true"
}
else{
Write-Host "Symbols Exclusion file does not exists"
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false"
}

- task: PublishBuildArtifacts@1
displayName: Publish SymbolPublishingExclusionsFile Artifact
condition: eq(variables['SymbolExclusionFile'], 'true')
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
PublishLocation: Container
ArtifactName: ReleaseConfigs

- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
- template: /eng/common/templates/steps/publish-logs.yml
parameters:
Expand Down
3 changes: 2 additions & 1 deletion eng/publishing/v3/publish-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
AssetManifests/**
BlobArtifacts/MergedManifest.xml
PdbArtifacts/**
ReleaseConfigs/SymbolPublishingExclusionsFile.txt
downloadPath: '$(Build.ArtifactStagingDirectory)'

- task: NuGetToolInstaller@1
Expand Down Expand Up @@ -84,7 +85,7 @@ jobs:
/p:AkaMSClientSecret=$(akams-client-secret)
${{ parameters.artifactsPublishingAdditionalParameters }}
/p:PDBArtifactsBasePath='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
/p:SymbolPublishingExclusionsFile='$(Build.ArtifactStagingDirectory)/ReleaseConfigs/SymbolPublishingExclusionsFile.txt'
${{ parameters.symbolPublishingAdditionalParameters}}
/p:MsdlToken=$(microsoft-symbol-server-pat)
/p:SymWebToken=$(symweb-symbol-server-pat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,27 @@ public async Task PublishSymbolsUsingStreamingAsync(
HashSet<TargetFeedConfig> feedConfigsForSymbols = FeedConfigs[symbolCategory];
Dictionary<string, string> serversToPublish =
GetTargetSymbolServers(feedConfigsForSymbols, msdlToken, symWebToken);
HashSet<string> excludeFiles = null;

if(File.Exists(symbolPublishingExclusionsFile))
{
Log.LogMessage(MessageImportance.Normal, $"SymbolPublishingExclusionFile exists");
string[] files = File.ReadAllLines(symbolPublishingExclusionsFile);
excludeFiles = new HashSet<string>();

foreach(var file in files)
{
if(!string.IsNullOrEmpty(file))
{
Log.LogMessage(MessageImportance.Normal, $"Exclude the file {file} from publishing to symbol server");
excludeFiles.Add(file);
}
}
}
else
{
Log.LogMessage(MessageImportance.Normal, $"SymbolPublishingExclusionFile was not found at ${symbolPublishingExclusionsFile} ");
}

if (symbolsToPublish != null && symbolsToPublish.Any())
{
Expand Down Expand Up @@ -471,7 +492,7 @@ await PublishSymbolsHelper.PublishAsync(
token,
symbolFiles,
null,
null,
excludeFiles,
ExpirationInDays,
false,
publishSpecialClrFiles,
Expand Down Expand Up @@ -537,7 +558,7 @@ await PublishSymbolsHelper.PublishAsync(
token,
null,
filesToSymbolServer,
null,
excludeFiles,
ExpirationInDays,
false,
publishSpecialClrFiles,
Expand Down