-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add stage for symbols job in Release build #18937
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c1951b9
add stage for symbols job
anamnavi e1729bf
use correct image and filter downloaded files
anamnavi 7cfeebf
filter for signed files
anamnavi 12e584c
extract symbols correctly
anamnavi a4eaa4d
run publish symbol job at release time, not build time
anamnavi a5cfb11
remove comment
anamnavi e47a085
remove trailing space
anamnavi 23e8a19
remove symbol code from build time
anamnavi 154785a
download artifacts directory
anamnavi 43fc54a
use minimatch instead of downloading all zip files
anamnavi a53c121
fix indentation in yml file
anamnavi 00db82b
add line after jobs in yml
anamnavi 27b88da
fix indentation
anamnavi b25cf3f
fix stage name
anamnavi c82a8b5
fix stage name
anamnavi b26b2db
save downloaded artifacts to pipeline workspace and use correct patte…
anamnavi e376a5a
new-item typo
anamnavi d6b7e5b
fix minimatch pattern
anamnavi e640c5f
exclude minimatch should have an include pattern too
anamnavi 0f26ccc
include pattern specify subfolder
anamnavi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
tools/releaseBuild/azureDevOps/templates/release-PublishSymbols.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.