From 3e6e905950c454c44dc074c95e75e94259d7f190 Mon Sep 17 00:00:00 2001 From: travis plunk Date: Wed, 26 Jan 2022 12:13:02 -0800 Subject: [PATCH 1/3] remove wix install --- .../templates/windows-packaging.yml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml index a93908a8f6c..b78abf545cc 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -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 @@ -370,10 +351,5 @@ jobs: 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() From 6fc3427d506c2a1738d616e4a5948334fd6f4d3c Mon Sep 17 00:00:00 2001 From: travis plunk Date: Wed, 26 Jan 2022 12:13:15 -0800 Subject: [PATCH 2/3] switch to pwsh --- .../azureDevOps/templates/windows-packaging.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml index b78abf545cc..956eb19d855 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -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' } @@ -189,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' @@ -212,7 +212,7 @@ jobs: PackageVersion: $(Version) sourceScanPath: '$(PowerShellRoot)\tools' - - powershell: | + - pwsh: | Import-Module $(PowerShellRoot)/build.psm1 -Force Import-Module $(PowerShellRoot)/tools/packaging -Force @@ -253,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" @@ -344,7 +344,7 @@ jobs: sourceScanPath: '$(PowerShellRoot)\tools' snapshotForceEnabled: true - - powershell: | + - pwsh: | if ((Test-Path "\PowerShell")) { Remove-Item -Path "\PowerShell" -Force -Recurse -Verbose } From 157a64fd6170dea4ceb6345adcebaef063ab85ee Mon Sep 17 00:00:00 2001 From: travis plunk Date: Wed, 26 Jan 2022 12:13:29 -0800 Subject: [PATCH 3/3] fix pool --- tools/releaseBuild/azureDevOps/releasePipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/releaseBuild/azureDevOps/releasePipeline.yml b/tools/releaseBuild/azureDevOps/releasePipeline.yml index 49cc3536c20..c1e3315082d 100644 --- a/tools/releaseBuild/azureDevOps/releasePipeline.yml +++ b/tools/releaseBuild/azureDevOps/releasePipeline.yml @@ -177,7 +177,8 @@ stages: - deployment: AzureBlobPublic displayName: Make Azure Blob Public - pool: PowerShell1ES + pool: + name: PowerShell1ES demands: - ImageOverride -equals PSMMS2019-Secure