Skip to content
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

Publish symbols for Microsoft.PowerShell.PSResourceGet package #1421

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bef1f09
add stage to publish symbols to symbol server
anamnavi Sep 19, 2023
21e2ba1
add newline
anamnavi Sep 19, 2023
2443cf5
add logging command to upload pdb file
anamnavi Sep 20, 2023
df55b07
reference symbol file name
anamnavi Sep 24, 2023
53784f6
remove code from ci_release
anamnavi Sep 24, 2023
981801c
use Microsoft.Powershell.PSResourceGet in CI as we released a new Pow…
anamnavi Sep 24, 2023
fa6fd10
debug test.yml
anamnavi Sep 24, 2023
f774aec
debug config name
anamnavi Sep 24, 2023
af62a22
check what local repo contains
anamnavi Sep 24, 2023
4999fd4
add recurse
anamnavi Sep 24, 2023
7822717
perform find
anamnavi Sep 24, 2023
36a95ba
add prerelease param
anamnavi Sep 24, 2023
b463dad
add verbose statements
anamnavi Sep 25, 2023
e644b63
PackagePath is a URI
anamnavi Sep 25, 2023
9f9dfce
rmeove verbose statements
anamnavi Sep 25, 2023
bd46ade
add verbose to find
anamnavi Sep 25, 2023
f4dd62e
add verbose to find
anamnavi Sep 25, 2023
3a583e9
add debug and try nupkg folder
anamnavi Sep 25, 2023
4a3d9a5
specify nupkg folder in repo URI
anamnavi Sep 25, 2023
5e331ef
remove find code
anamnavi Sep 25, 2023
d1687f1
add TrustRepository
anamnavi Sep 25, 2023
c2f24b0
add code to upload pdb
anamnavi Sep 25, 2023
6dfb572
update ADO error code
anamnavi Sep 25, 2023
080907f
fix publish symbols job
anamnavi Sep 25, 2023
c14f33b
fix publish symbols job
anamnavi Sep 25, 2023
4cd325c
Merge branch 'master' of https://github.com/anamnavi/PowerShellGet in…
anamnavi Sep 26, 2023
2c37f42
remove ToString() call
anamnavi Sep 26, 2023
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
12 changes: 12 additions & 0 deletions .ci/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ stages:
$vstsCommandString = "vso[task.setvariable variable=signOutPathCreated]${signOutPath}"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"

# Upload symbol pdb file
$moduleName = "$($config.ModuleName)"
$symbolFileName = "$moduleName.pdb"
$symbolFilePath = Join-Path -Path $srcPath -ChildPath $symbolFileName
Write-Host "##vso[artifact.upload containerfolder=$moduleName;artifactname=$symbolFileName]$symbolFilePath"
displayName: Set up for module created files code signing
condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True'))

Expand Down Expand Up @@ -407,6 +413,12 @@ stages:
displayName: PowerShell Core on macOS
imageName: macOS-latest

- stage: PublishSymbols
displayName: Publish Symbols
condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), eq(variables['Publish'], 'True'))
jobs:
- template: publishsymbols.yml

- stage: Release
displayName: Publish Package to PSGallery
condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), eq(variables['Publish'], 'True'))
Expand Down
39 changes: 39 additions & 0 deletions .ci/publishsymbols.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
parameters:
jobName1: publish_symbols_job
displayValidationJob1: 'Publish symbol to Microsoft symbol server'

jobs:
- job: ${{ parameters.jobName1 }}
displayName: ${{ parameters.displayValidationJob1 }}
pool:
name: 1ES
demands:
- ImageOverride -equals PSMMS2019-Secure
timeoutInMinutes: 2880 # job times out in 2 days
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download and publish symbols'
inputs:
artifact: $(Pipeline.Workspace)\Microsoft.PowerShell.PSResourceGet\Microsoft.PowerShell.PSResourceGet.pdb
path: '$(Pipeline.Workspace)\Microsoft.PowerShell.PSResourceGet'

- pwsh: |
Write-Verbose -Verbose "Enumerating $(Pipeline.Workspace)\Microsoft.PowerShell.PSResourceGet"
$symbolsRoot = New-Item -Path "$(Pipeline.Workspace)/symbols" -ItemType Directory -Verbose
Copy-Item -Path "$(Pipeline.Workspace)\Microsoft.PowerShell.PSResourceGet\Microsoft.PowerShell.PSResourceGet.pdb" -Destination $symbolsRoot

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: Copy symbol file

- task: PublishSymbols@2
inputs:
symbolsFolder: '$(SymbolsPath)'
searchPattern: '*.pdb'
indexSources: false
publishSymbols: true
symbolServerType: teamServices
detailedLog: true
Loading