@@ -8,6 +8,8 @@ variables:
8
8
- name : PackageRoot
9
9
value : ' $(System.ArtifactsDirectory)/Packages'
10
10
- group : PSNativeAPIScan
11
+ - group : SymbolPublish
12
+ - group : Azure Blob variable group
11
13
12
14
resources :
13
15
repositories :
@@ -105,6 +107,54 @@ stages:
105
107
steps :
106
108
- template : nuget.yml
107
109
110
+ - stage : PublishSymbol
111
+ displayName : Publish pwrshplugin symbols
112
+ dependsOn : Build
113
+ jobs :
114
+ - job : Symbols_Job
115
+ pool :
116
+ name : PowerShell1ES
117
+ demands :
118
+ - ImageOverride -equals PSMMS2019-PS-Native-Secure
119
+ steps :
120
+ - download : current
121
+ artifact : release
122
+
123
+ - pwsh : |
124
+ Write-Verbose -Verbose "Enumerating $(Pipeline.Workspace)/release"
125
+ $downloadedArtifacts = Get-ChildItem -Recurse "$(Pipeline.Workspace)/release"
126
+ $downloadedArtifacts
127
+
128
+ $expandedRoot = New-Item -Path "$(Pipeline.Workspace)/expanded" -ItemType Directory -Verbose
129
+ $symbolsRoot = New-Item -Path "$(Pipeline.Workspace)/symbols" -ItemType Directory -Verbose
130
+
131
+ $downloadedArtifacts | Where-Object { $_.Name -like 'x*-symbols.zip'} | ForEach-Object {
132
+ $destFolder = New-Item -Path "$expandedRoot/$($_.BaseName)/" -ItemType Directory -Verbose
133
+ Expand-Archive -Path $_.FullName -DestinationPath $destFolder -Force
134
+
135
+ Get-ChildItem -Path $destFolder -Recurse -Filter '*.pdb' | ForEach-Object {
136
+ $runtimeFolder = New-Item -Path "$symbolsRoot/$($destFolder.BaseName)/" -ItemType Directory -Verbose
137
+ Copy-Item -Path $_.FullName -Destination $runtimeFolder -Verbose
138
+ }
139
+ }
140
+
141
+ Write-Verbose -Verbose "Enumerating $symbolsRoot"
142
+ Get-ChildItem -Path $symbolsRoot -Recurse
143
+
144
+ $vstsCommandString = "vso[task.setvariable variable=SymbolsPath]$symbolsRoot"
145
+ Write-Verbose -Message "$vstsCommandString" -Verbose
146
+ Write-Host -Object "##$vstsCommandString"
147
+ displayName: Expand and capture symbols folders
148
+
149
+ - task : PublishSymbols@2
150
+ inputs :
151
+ symbolsFolder : ' $(SymbolsPath)'
152
+ searchPattern : ' **/*.pdb'
153
+ indexSources : false
154
+ publishSymbols : true
155
+ symbolServerType : teamServices
156
+ detailedLog : true
157
+
108
158
- stage : compliance
109
159
displayName : Compliance
110
160
dependsOn : Build
0 commit comments