Skip to content
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
14 changes: 14 additions & 0 deletions tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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