@@ -9,8 +9,8 @@ parameters:
9
9
default : ' '
10
10
11
11
jobs :
12
- - job : sign_windows_${{ parameters.Architecture }}
13
- displayName : Package Windows - ${{ parameters.Architecture }}
12
+ - job : sign_windows_${{ parameters.Architecture }}_${{ parameters.BuildConfiguration }}
13
+ displayName : Package Windows - ${{ parameters.Architecture }} ${{ parameters.BuildConfiguration }}
14
14
condition : succeeded()
15
15
dependsOn : ${{ parameters.parentJob }}
16
16
pool :
@@ -36,18 +36,14 @@ jobs:
36
36
- checkout : ComplianceRepo
37
37
clean : true
38
38
39
- - template : shouldSign.yml
40
39
- template : SetVersionVariables.yml
41
40
parameters :
42
41
ReleaseTagVar : $(ReleaseTagVar)
43
42
44
- - powershell : |
45
- $pkgFilter = if ( '$(Architecture)' -eq 'arm' ) {
46
- "arm32"
47
- }
48
- else {
49
- '$(Architecture)'
50
- }
43
+ - template : shouldSign.yml
44
+
45
+ - pwsh : |
46
+ $pkgFilter = if ( '$(Architecture)' -eq 'arm' ) { "arm32" } else { '$(Architecture)' }
51
47
52
48
$vstsCommandString = "vso[task.setvariable variable=PkgFilter]$pkgFilter"
53
49
Write-Host ("sending " + $vstsCommandString)
@@ -63,27 +59,16 @@ jobs:
63
59
- template : cloneToOfficialPath.yml
64
60
65
61
- pwsh : |
66
- # cleanup previous install
67
- if((Test-Path "${env:ProgramFiles(x86)}\WiX Toolset xcopy")) {
68
- Remove-Item "${env:ProgramFiles(x86)}\WiX Toolset xcopy" -Recurse -Force
62
+ $zipPathString = '$(System.ArtifactsDirectory)\Symbols\results\*$(PkgFilter).zip'
63
+ Write-Verbose -Verbose "Zip Path: $zipPathString"
64
+ $zipPath = Get-Item $zipPathString
65
+ if(@($zipPath).Count -eq 0) {
66
+ throw "No files found at '$zipPathString'"
67
+ }
68
+ elseif(@($zipPath).Count -ne 1) {
69
+ $names = $zipPath.Name -join "', '"
70
+ throw "multiple files '${names}' found with '${zipPathString}'"
69
71
}
70
-
71
- $toolsDir = New-Item -ItemType Directory -Path '$(Build.ArtifactStagingDirectory)\tools'
72
- $wixUri = 'https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip'
73
- Invoke-RestMethod -Uri $wixUri -OutFile '$(Build.ArtifactStagingDirectory)\tools\wix.zip' -MaximumRetryCount 5 -RetryIntervalSec 10
74
-
75
- Import-Module '$(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/wix.psm1'
76
- Install-WixZip -zipPath '$(Build.ArtifactStagingDirectory)\tools\wix.zip'
77
-
78
- $msixUrl = '$(makeappUrl)'
79
- Invoke-RestMethod -Uri $msixUrl -OutFile '\makeappx.zip'
80
- Expand-Archive '\makeappx.zip' -destination '\' -Force
81
-
82
- displayName: Install packaging tools
83
-
84
- - powershell : |
85
- $zipPath = Get-Item '$(System.ArtifactsDirectory)\Symbols\results\*$(PkgFilter).zip'
86
- Write-Verbose -Verbose "Zip Path: $zipPath"
87
72
88
73
$expandedFolder = $zipPath.BaseName
89
74
Write-Host "sending.. vso[task.setvariable variable=SymbolsFolder]$expandedFolder"
@@ -202,13 +187,14 @@ jobs:
202
187
**\*.dll
203
188
useMinimatch : true
204
189
shouldSign : $(SHOULD_SIGN)
190
+ displayName : Sign ThirdParty binaries
205
191
206
- - powershell : |
192
+ - pwsh : |
207
193
Get-ChildItem '$(System.ArtifactsDirectory)\thirdPartySigned\*'
208
194
displayName: Captrue ThirdParty Signed files
209
195
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))
210
196
211
- - powershell : |
197
+ - pwsh : |
212
198
Import-Module $(PowerShellRoot)/build.psm1 -Force
213
199
Import-Module $(PowerShellRoot)/tools/packaging -Force
214
200
$signedFilesPath = '$(System.ArtifactsDirectory)\thirdPartySigned'
@@ -226,7 +212,7 @@ jobs:
226
212
PackageVersion : $(Version)
227
213
sourceScanPath : ' $(PowerShellRoot)\tools'
228
214
229
- - powershell : |
215
+ - pwsh : |
230
216
Import-Module $(PowerShellRoot)/build.psm1 -Force
231
217
Import-Module $(PowerShellRoot)/tools/packaging -Force
232
218
@@ -245,7 +231,7 @@ jobs:
245
231
Write-Host "##$vstsCommandString"
246
232
displayName: Compress signed files
247
233
248
- - powershell : |
234
+ - pwsh : |
249
235
$runtime = switch ($env:Architecture)
250
236
{
251
237
"x64" { "win7-x64" }
@@ -257,13 +243,12 @@ jobs:
257
243
}
258
244
259
245
$signedPkg = "$(BuildPackagePath)"
260
-
261
246
Write-Verbose -Verbose -Message "signedPkg = $signedPkg"
262
247
263
248
$(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -BuildZip $signedPkg -location '$(PowerShellRoot)' -destination '$(System.ArtifactsDirectory)\pkgSigned' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)'
264
249
displayName: 'Build Windows Universal - $(Architecture) Package'
265
250
266
- - powershell : |
251
+ - pwsh : |
267
252
Get-ChildItem '$(System.ArtifactsDirectory)\pkgSigned' | ForEach-Object {
268
253
$packagePath = $_.FullName
269
254
Write-Host "Uploading $packagePath"
@@ -277,17 +262,12 @@ jobs:
277
262
sourceScanPath : ' $(PowerShellRoot)\tools'
278
263
snapshotForceEnabled : true
279
264
280
- - powershell : |
265
+ - pwsh : |
281
266
if ((Test-Path "\PowerShell")) {
282
267
Remove-Item -Path "\PowerShell" -Force -Recurse -Verbose
283
268
}
284
269
else {
285
270
Write-Verbose -Verbose -Message "No cleanup required."
286
271
}
287
-
288
- if((Test-Path "${env:ProgramFiles(x86)}\WiX Toolset xcopy")) {
289
- Write-Verbose -Verbose "Cleaning up Wix tools"
290
- Remove-Item "${env:ProgramFiles(x86)}\WiX Toolset xcopy" -Recurse -Force
291
- }
292
272
displayName: Clean up local Clone
293
273
condition: always()
0 commit comments