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

Remove WiX install #16834

Merged
merged 3 commits into from
Feb 2, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ stages:
- deployment: AzureBlobPublic
displayName: Make Azure Blob Public

pool: PowerShell1ES
pool:
name: PowerShell1ES
demands:
- ImageOverride -equals PSMMS2019-Secure

Expand Down
36 changes: 6 additions & 30 deletions tools/releaseBuild/azureDevOps/templates/windows-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- template: shouldSign.yml

- powershell: |
- pwsh: |
$pkgFilter = if ( '$(Architecture)' -eq 'arm' ) { "arm32" } else { '$(Architecture)' }
if ($env:BuildConfiguration -eq 'minSize') { $pkgFilter += '-gc' }

Expand All @@ -60,25 +60,6 @@ jobs:
- template: cloneToOfficialPath.yml

- pwsh: |
# cleanup previous install
if((Test-Path "${env:ProgramFiles(x86)}\WiX Toolset xcopy")) {
Remove-Item "${env:ProgramFiles(x86)}\WiX Toolset xcopy" -Recurse -Force
}

$toolsDir = New-Item -ItemType Directory -Path '$(Build.ArtifactStagingDirectory)\tools'
$wixUri = 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip'
Invoke-RestMethod -Uri $wixUri -OutFile '$(Build.ArtifactStagingDirectory)\tools\wix.zip' -MaximumRetryCount 5 -RetryIntervalSec 10

Import-Module '$(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/wix.psm1'
Install-WixZip -zipPath '$(Build.ArtifactStagingDirectory)\tools\wix.zip'

$msixUrl = '$(makeappUrl)'
Invoke-RestMethod -Uri $msixUrl -OutFile '\makeappx.zip'
Expand-Archive '\makeappx.zip' -destination '\' -Force

displayName: Install packaging tools

- powershell: |
$zipPathString = '$(System.ArtifactsDirectory)\Symbols\results\*$(PkgFilter).zip'
Write-Verbose -Verbose "Zip Path: $zipPathString"
$zipPath = Get-Item $zipPathString
Expand Down Expand Up @@ -208,12 +189,12 @@ jobs:
shouldSign: $(SHOULD_SIGN)
displayName: Sign ThirdParty binaries

- powershell: |
- pwsh: |
Get-ChildItem '$(System.ArtifactsDirectory)\thirdPartySigned\*'
displayName: Capture ThirdParty Signed files
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))

- powershell: |
- pwsh: |
Import-Module $(PowerShellRoot)/build.psm1 -Force
Import-Module $(PowerShellRoot)/tools/packaging -Force
$signedFilesPath = '$(System.ArtifactsDirectory)\thirdPartySigned'
Expand All @@ -231,7 +212,7 @@ jobs:
PackageVersion: $(Version)
sourceScanPath: '$(PowerShellRoot)\tools'

- powershell: |
- pwsh: |
Import-Module $(PowerShellRoot)/build.psm1 -Force
Import-Module $(PowerShellRoot)/tools/packaging -Force

Expand Down Expand Up @@ -272,7 +253,7 @@ jobs:
$(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -BuildZip $signedPkg -location '$(PowerShellRoot)' -destination '$(System.ArtifactsDirectory)\pkgSigned' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)' @params
displayName: 'Build Windows Universal - $(Architecture) Package'

- powershell: |
- pwsh: |
Get-ChildItem '$(System.ArtifactsDirectory)\pkgSigned' | ForEach-Object {
$packagePath = $_.FullName
Write-Host "Uploading $packagePath"
Expand Down Expand Up @@ -363,17 +344,12 @@ jobs:
sourceScanPath: '$(PowerShellRoot)\tools'
snapshotForceEnabled: true

- powershell: |
- pwsh: |
if ((Test-Path "\PowerShell")) {
Remove-Item -Path "\PowerShell" -Force -Recurse -Verbose
}
else {
Write-Verbose -Verbose -Message "No cleanup required."
}

if((Test-Path "${env:ProgramFiles(x86)}\WiX Toolset xcopy")) {
Write-Verbose -Verbose "Cleaning up Wix tools"
Remove-Item "${env:ProgramFiles(x86)}\WiX Toolset xcopy" -Recurse -Force
}
displayName: Clean up local Clone
condition: always()