mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add stage for symbols job in Release build (#18937)
This commit is contained in:
@@ -338,6 +338,20 @@ stages:
|
||||
steps:
|
||||
- template: templates/release-PublishPackageMsftCom.yml
|
||||
|
||||
- stage: PublishSymbols
|
||||
displayName: Publish symbols
|
||||
dependsOn: PublishPackages
|
||||
jobs:
|
||||
- job: PublishSymbol
|
||||
|
||||
pool:
|
||||
name: PowerShell1ES
|
||||
demands:
|
||||
- ImageOverride -equals PSMMS2019-Secure
|
||||
|
||||
steps:
|
||||
- template: templates/release-PublishSymbols.yml
|
||||
|
||||
- stage: ChangesToMaster
|
||||
displayName: Ensure changes are in GH master
|
||||
dependsOn: PublishPackages
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
source: specific
|
||||
project: PowerShellCore
|
||||
pipeline: '696'
|
||||
preferTriggeringPipeline: true
|
||||
runVersion: latestFromBranch
|
||||
runBranch: '$(Build.SourceBranch)'
|
||||
artifact: results
|
||||
path: '$(Pipeline.Workspace)\results'
|
||||
itemPattern: |
|
||||
**/*
|
||||
!**/*signed.zip
|
||||
|
||||
- pwsh: |
|
||||
Write-Verbose -Verbose "Enumerating $(Pipeline.Workspace)\results"
|
||||
$downloadedArtifacts = Get-ChildItem -Recurse "$(Pipeline.Workspace)\results"
|
||||
$downloadedArtifacts
|
||||
$expandedRoot = New-Item -Path "$(Pipeline.Workspace)/expanded" -ItemType Directory -Verbose
|
||||
$symbolsRoot = New-Item -Path "$(Pipeline.Workspace)/symbols" -ItemType Directory -Verbose
|
||||
|
||||
$downloadedArtifacts | ForEach-Object {
|
||||
$destFolder = New-Item -Path "$expandedRoot/$($_.BaseName)/" -ItemType Directory -Verbose
|
||||
Expand-Archive -Path $_.FullName -DestinationPath $destFolder -Force
|
||||
|
||||
$symbolsZipFile = Join-Path -Path $destFolder -ChildPath "symbols.zip"
|
||||
$symbolZipFileContents = New-Item -Path "$destFolder/Symbols-$($_.BaseName)" -ItemType Directory -Verbose
|
||||
Expand-Archive -Path $symbolsZipFile -DestinationPath $symbolZipFileContents -Force
|
||||
|
||||
$symbolsToPublish = New-Item -Path "$symbolsRoot/$($_.BaseName)" -ItemType Directory -Verbose
|
||||
|
||||
Get-ChildItem -Path $symbolZipFileContents -Recurse -Filter '*.pdb' | ForEach-Object {
|
||||
Copy-Item -Path $_.FullName -Destination $symbolsToPublish -Verbose
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose -Verbose "Enumerating $symbolsRoot"
|
||||
Get-ChildItem -Path $symbolsRoot -Recurse
|
||||
$vstsCommandString = "vso[task.setvariable variable=SymbolsPath]$symbolsRoot"
|
||||
Write-Verbose -Message "$vstsCommandString" -Verbose
|
||||
Write-Host -Object "##$vstsCommandString"
|
||||
displayName: Expand and capture symbols folders
|
||||
- task: PublishSymbols@2
|
||||
inputs:
|
||||
symbolsFolder: '$(SymbolsPath)'
|
||||
searchPattern: '**/*.pdb'
|
||||
indexSources: false
|
||||
publishSymbols: true
|
||||
symbolServerType: teamServices
|
||||
detailedLog: true
|
||||
Reference in New Issue
Block a user