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

Revert "Should not publish the files in SymbolPublishingExclusionFile… #7730

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 25 deletions eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,31 +94,7 @@ 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: 1 addition & 2 deletions eng/publishing/v3/publish-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
AssetManifests/**
BlobArtifacts/MergedManifest.xml
PdbArtifacts/**
ReleaseConfigs/SymbolPublishingExclusionsFile.txt
downloadPath: '$(Build.ArtifactStagingDirectory)'

- task: NuGetToolInstaller@1
Expand Down Expand Up @@ -85,7 +84,7 @@ jobs:
/p:AkaMSClientSecret=$(akams-client-secret)
${{ parameters.artifactsPublishingAdditionalParameters }}
/p:PDBArtifactsBasePath='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
/p:SymbolPublishingExclusionsFile='$(Build.ArtifactStagingDirectory)/ReleaseConfigs/SymbolPublishingExclusionsFile.txt'
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/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,26 +426,6 @@ public async Task PublishSymbolsUsingStreamingAsync(
HashSet<TargetFeedConfig> feedConfigsForSymbols = FeedConfigs[symbolCategory];
Dictionary<string, string> serversToPublish =
GetTargetSymbolServers(feedConfigsForSymbols, msdlToken, symWebToken);
HashSet<string> excludeFiles = new HashSet<string>();

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

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 @@ -491,7 +471,7 @@ await PublishSymbolsHelper.PublishAsync(
token,
symbolFiles,
null,
excludeFiles,
null,
ExpirationInDays,
false,
publishSpecialClrFiles,
Expand Down Expand Up @@ -557,7 +537,7 @@ await PublishSymbolsHelper.PublishAsync(
token,
null,
filesToSymbolServer,
excludeFiles,
null,
ExpirationInDays,
false,
publishSpecialClrFiles,
Expand Down