From 7469e4d32d921735849942f89f6ece312722d261 Mon Sep 17 00:00:00 2001 From: Kyaw Thant <48363984+kythant@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:22:24 -0700 Subject: [PATCH] Public Symbols Publishing New WorkFlow (#4311) * Publish Internally Only * add parameter * call --- ...ndowsAppSDK-PackTransportPackage-Stage.yml | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml index 3dacfae318..9c147c7bf5 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Stage.yml @@ -136,26 +136,30 @@ stages: # This ADO task does not support indexing of github sources currently :-( indexSources: false detailedLog: true + SymbolsArtifactName: $(symbolsArtifactName) # There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it). # To work around this issue, we just force LIB to be any dir that we know exists. env: LIB: $(Build.SourcesDirectory) - - ${{ if eq(parameters.isOfficial, 'true') }}: - - task: PublishSymbols@2 - displayName: 'Publish symbols to public server (without source indexing)' + # Publishing symbols publicly requires making an API call to the service and is handled by PublishPublicSymbols.ps1 + # in eng/common + # See this page for more info: + # https://www.osgwiki.com/wiki/Symbols_Publishing_Pipeline_to_SymWeb_and_MSDL + - ${{ if eq(parameters.IsOfficial, 'true') }}: + - pwsh: | + Install-Module -Name Az.Accounts -Scope AllUsers -AllowClobber -Force + displayName: Install Az.Accounts PowerShell module + + # WinAppSDK-AZSC service connection must be used because the service principal created by this connection has been granted read and publish access + - task: AzurePowerShell@5 + displayName: Publish symbols to SymWeb and MSDL inputs: - searchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb' - symbolServerType: 'TeamServices' - # This ADO task does not support indexing of github sources currently :-( - indexSources: false - detailedLog: true - # # There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it). - # # To work around this issue, we just force LIB to be any dir that we know exists. - Pat: $(WinAppSdkLabSymbolsPAT) - env: - LIB: $(Build.SourcesDirectory) - ArtifactServices_Symbol_AccountName: microsoftpublicsymbols + azureSubscription: 'WinAppSDK-AZSC' + ScriptType: 'InlineScript' + Inline: $(Build.SourcesDirectory)\eng\common\Scripts\PublishPublicSymbols.ps1 -RequestName "$(symbolsArtifactName)" + azurePowerShellVersion: 'LatestVersion' + pwsh: true - task: PowerShell@2 name: SetVersion