Skip to content

Commit

Permalink
Fix Windows symbols publishing in the Nuget pipeline. (#98)
Browse files Browse the repository at this point in the history
Since the Nuget creation and Nuget code signing are now done as two separate stages in the build pipeline, the Windows symbols publishing task fails as it relied on the DownloadBuildArtifacts tasks in the Nuget creation step. (This was missed in the refactoring of the pipeline in PR #93.)
However, since the Nuget doesn't contain any symbols at all, we can move the DownloadBuildArtifacts tasks entirely to the Nuget code signing stage instead.

Also, it turns out that the PublishSymbols task cannot run on the public Azure Pipelines pool and must be run on the PackageES pool. (Note: I skipped the actual publish step when testing PR #93, as you can't unpublish things once published. However, when running the Release Pipeline to publish for real, it errors out.)

Note: FWIW, the ProjectReunion pipeline also uses the PackageES lab for publishing symbols as well here:
https://github.com/microsoft/ProjectReunion/blob/1714557cad5e740c0153e451fbf0311c8e5bdfc1/build/ProjectReunion-BuildFoundation.yml#L172-L188
  • Loading branch information
jefgen authored Apr 15, 2021
1 parent 5ceb17c commit 7b46fba
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions build/azure-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,25 +416,6 @@ stages:
artifactName: 'linux-arm64'
downloadPath: '$(Build.BINARIESDIRECTORY)\bits'

# Symbols (PDBs)
- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-x86'
inputs:
artifactName: 'symbols-win-x86'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-x64'
inputs:
artifactName: 'symbols-win-x64'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-ARM64'
inputs:
artifactName: 'symbols-win-ARM64'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- powershell: |
Write-Host ""
Write-Host "$(BUILD.BINARIESDIRECTORY)"
Expand Down Expand Up @@ -470,8 +451,7 @@ stages:
- CreateNuget
condition: and(eq(variables.codeSign, true), and(in(dependencies.CodeSignBinaries.result, 'Succeeded'), in(dependencies.CreateNuget.result, 'Succeeded')))
pool:
name: Azure Pipelines
vmImage: 'windows-2019'
name: Package ES CodeHub Lab E
variables:
BuildPlatform: AnyCPU

Expand Down Expand Up @@ -555,6 +535,31 @@ stages:
PathtoPublish: '$(BUILD.ArtifactStagingDirectory)\nuget\Nuget_Packages'
ArtifactName: 'Nuget_Packages_Signed'

# Symbols (PDBs)
- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-x86'
inputs:
artifactName: 'symbols-win-x86'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-x64'
inputs:
artifactName: 'symbols-win-x64'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- task: DownloadBuildArtifacts@0
displayName: 'Download symbols-win-ARM64'
inputs:
artifactName: 'symbols-win-ARM64'
downloadPath: '$(Build.BINARIESDIRECTORY)\symbols'

- powershell: |
Write-Host ""
Write-Host "$(BUILD.BINARIESDIRECTORY)"
Tree /F /A $(BUILD.BINARIESDIRECTORY)
displayName: 'DIAG: dir'
# Publish the Windows Symbols to the public symbols server
- task: PublishSymbols@2
displayName: 'Publish Windows Symbols'
Expand Down

0 comments on commit 7b46fba

Please sign in to comment.