From 9afd3b54ceb2556136c749cee6650e8d36f22ad0 Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov Date: Wed, 22 Nov 2023 16:39:05 +0100 Subject: [PATCH 1/2] [Windows] Update helper name to Expand-7ZipArchive --- images/windows/scripts/build/Install-ActionsCache.ps1 | 2 +- images/windows/scripts/build/Install-AliyunCli.ps1 | 2 +- images/windows/scripts/build/Install-AndroidSDK.ps1 | 4 ++-- .../scripts/build/Install-BizTalkBuildComponent.ps1 | 2 +- images/windows/scripts/build/Install-Chrome.ps1 | 2 +- images/windows/scripts/build/Install-CloudFoundryCli.ps1 | 2 +- images/windows/scripts/build/Install-CodeQLBundle.ps1 | 4 ++-- images/windows/scripts/build/Install-EdgeDriver.ps1 | 2 +- images/windows/scripts/build/Install-Firefox.ps1 | 2 +- images/windows/scripts/build/Install-IEWebDriver.ps1 | 2 +- images/windows/scripts/build/Install-JavaTools.ps1 | 4 ++-- images/windows/scripts/build/Install-Kotlin.ps1 | 2 +- images/windows/scripts/build/Install-Mingw64.ps1 | 4 ++-- images/windows/scripts/build/Install-PyPy.ps1 | 2 +- images/windows/scripts/build/Install-Ruby.ps1 | 2 +- images/windows/scripts/build/Install-Stack.ps1 | 2 +- images/windows/scripts/build/Install-Toolset.ps1 | 8 ++++---- images/windows/scripts/build/Install-Zstd.ps1 | 4 ++-- images/windows/scripts/helpers/ImageHelpers.psm1 | 2 +- images/windows/scripts/helpers/InstallHelpers.ps1 | 2 +- 20 files changed, 28 insertions(+), 28 deletions(-) diff --git a/images/windows/scripts/build/Install-ActionsCache.ps1 b/images/windows/scripts/build/Install-ActionsCache.ps1 index 05c41a5ff06c..3680f58e98f6 100644 --- a/images/windows/scripts/build/Install-ActionsCache.ps1 +++ b/images/windows/scripts/build/Install-ActionsCache.ps1 @@ -14,6 +14,6 @@ Write-Host "Download Latest action-versions archive from $downloadUrl" $actionVersionsArchivePath = Start-DownloadWithRetry -Url $downloadUrl -Name "action-versions.zip" Write-Host "Expand action-versions archive" -Extract-7Zip -Path $actionVersionsArchivePath -DestinationPath $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE +Expand-7ZipArchive -Path $actionVersionsArchivePath -DestinationPath $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE Invoke-PesterTests -TestFile "ActionArchiveCache" diff --git a/images/windows/scripts/build/Install-AliyunCli.ps1 b/images/windows/scripts/build/Install-AliyunCli.ps1 index 97f7c3711b3e..a3967fba173f 100644 --- a/images/windows/scripts/build/Install-AliyunCli.ps1 +++ b/images/windows/scripts/build/Install-AliyunCli.ps1 @@ -21,7 +21,7 @@ Use-ChecksumComparison $fileHash $externalHash Write-Host "Expand aliyun-cli archive" $aliyunPath = "C:\aliyun-cli" New-Item -Path $aliyunPath -ItemType Directory -Force -Extract-7Zip -Path $packagePath -DestinationPath $aliyunPath +Expand-7ZipArchive -Path $packagePath -DestinationPath $aliyunPath # Add aliyun-cli to path Add-MachinePathItem $aliyunPath diff --git a/images/windows/scripts/build/Install-AndroidSDK.ps1 b/images/windows/scripts/build/Install-AndroidSDK.ps1 index 83580d9a0ee0..626cb43b96e6 100644 --- a/images/windows/scripts/build/Install-AndroidSDK.ps1 +++ b/images/windows/scripts/build/Install-AndroidSDK.ps1 @@ -19,7 +19,7 @@ Use-ChecksumComparison -LocalFileHash $localFileHash -DistributorFileHash $andro $sdkInstallRoot = "C:\Program Files (x86)\Android\android-sdk" $sdkRoot = "C:\Android\android-sdk" -Extract-7Zip -Path $cmdlineToolsArchPath -DestinationPath "${sdkInstallRoot}\cmdline-tools" +Expand-7ZipArchive -Path $cmdlineToolsArchPath -DestinationPath "${sdkInstallRoot}\cmdline-tools" # cmdline tools should be installed in ${sdkInstallRoot}\cmdline-tools\latest\bin, but archive contains ${sdkInstallRoot}\cmdline-tools\bin # we need to create the proper folder structure @@ -46,7 +46,7 @@ $sdkManager = "$sdkRoot\cmdline-tools\latest\bin\sdkmanager.bat" $licenseContentBase64 = "UEsDBBQAAAAAAKNK11IAAAAAAAA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Ryb2lkLXN5c2ltYWdlLWxpY2Vuc2UKACAAAAAAAAEAGAA4LjgXEWjXATguOBcRaNcBIgc4FxFo1wFQSwUGAAAAAAgACACDAwAACQMAAAAA" $licenseContent = [System.Convert]::FromBase64String($licenseContentBase64) Set-Content -Path "$sdkInstallRoot\android-sdk-licenses.zip" -Value $licenseContent -Encoding Byte -Extract-7Zip -Path "$sdkInstallRoot\android-sdk-licenses.zip" -DestinationPath $sdkInstallRoot +Expand-7ZipArchive -Path "$sdkInstallRoot\android-sdk-licenses.zip" -DestinationPath $sdkInstallRoot # install platform-tools $platformToolsPath = Join-Path -Path $sdkInstallRoot -ChildPath "platform-tools" diff --git a/images/windows/scripts/build/Install-BizTalkBuildComponent.ps1 b/images/windows/scripts/build/Install-BizTalkBuildComponent.ps1 index f1d7537acdfb..ea48c2a33e95 100644 --- a/images/windows/scripts/build/Install-BizTalkBuildComponent.ps1 +++ b/images/windows/scripts/build/Install-BizTalkBuildComponent.ps1 @@ -13,7 +13,7 @@ $setupPath = Join-Path $env:TEMP "BizTalkBuildComponent" if (-not (Test-Path -Path $setupPath)) { $null = New-Item -Path $setupPath -ItemType Directory -Force } -Extract-7Zip -Path $setupZipFile -DestinationPath $setupPath +Expand-7ZipArchive -Path $setupZipFile -DestinationPath $setupPath Write-Host "Installing BizTalk Project Build Component..." Install-Binary ` diff --git a/images/windows/scripts/build/Install-Chrome.ps1 b/images/windows/scripts/build/Install-Chrome.ps1 index 43b6a0f05006..05d1ce3ee4de 100644 --- a/images/windows/scripts/build/Install-Chrome.ps1 +++ b/images/windows/scripts/build/Install-Chrome.ps1 @@ -74,7 +74,7 @@ Write-Host "Download Chrome WebDriver from $ChromeDriverZipDownloadUrl..." $ChromeDriverArchPath = Start-DownloadWithRetry -Url $ChromeDriverZipDownloadUrl Write-Host "Expand Chrome WebDriver archive (without using directory names)..." -Extract-7Zip -Path $ChromeDriverArchPath -DestinationPath $ChromeDriverPath -ExtractMethod "e" +Expand-7ZipArchive -Path $ChromeDriverArchPath -DestinationPath $ChromeDriverPath -ExtractMethod "e" Write-Host "Setting the environment variables..." [Environment]::SetEnvironmentVariable("ChromeWebDriver", $ChromeDriverPath, "Machine") diff --git a/images/windows/scripts/build/Install-CloudFoundryCli.ps1 b/images/windows/scripts/build/Install-CloudFoundryCli.ps1 index 8b4416b17af3..8a806cd26ddc 100644 --- a/images/windows/scripts/build/Install-CloudFoundryCli.ps1 +++ b/images/windows/scripts/build/Install-CloudFoundryCli.ps1 @@ -15,7 +15,7 @@ New-Item -Path $CloudFoundryCliPath -ItemType Directory -Force # Extract the zip archive Write-Host "Extracting cf cli..." -Extract-7Zip -Path $CloudFoundryArchPath -DestinationPath $CloudFoundryCliPath +Expand-7ZipArchive -Path $CloudFoundryArchPath -DestinationPath $CloudFoundryCliPath # Add cf to path Add-MachinePathItem $CloudFoundryCliPath diff --git a/images/windows/scripts/build/Install-CodeQLBundle.ps1 b/images/windows/scripts/build/Install-CodeQLBundle.ps1 index b21977a20de3..381496a501ae 100644 --- a/images/windows/scripts/build/Install-CodeQLBundle.ps1 +++ b/images/windows/scripts/build/Install-CodeQLBundle.ps1 @@ -18,9 +18,9 @@ $CodeQLToolcachePath = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | New-Item -Path $CodeQLToolcachePath -ItemType Directory -Force | Out-Null Write-Host "Unpacking the downloaded CodeQL bundle archive..." -Extract-7Zip -Path $CodeQLBundlePath -DestinationPath $DownloadDirectoryPath +Expand-7ZipArchive -Path $CodeQLBundlePath -DestinationPath $DownloadDirectoryPath $UnGzipedCodeQLBundlePath = Join-Path $DownloadDirectoryPath "codeql-bundle.tar" -Extract-7Zip -Path $UnGzipedCodeQLBundlePath -DestinationPath $CodeQLToolcachePath +Expand-7ZipArchive -Path $UnGzipedCodeQLBundlePath -DestinationPath $CodeQLToolcachePath Write-Host "CodeQL bundle at $($CodeQLToolcachePath) contains the following directories:" Get-ChildItem -Path $CodeQLToolcachePath -Depth 2 diff --git a/images/windows/scripts/build/Install-EdgeDriver.ps1 b/images/windows/scripts/build/Install-EdgeDriver.ps1 index cae78844db93..6dd6eae18ea5 100644 --- a/images/windows/scripts/build/Install-EdgeDriver.ps1 +++ b/images/windows/scripts/build/Install-EdgeDriver.ps1 @@ -31,7 +31,7 @@ $EdgeDriverDownloadUrl = "https://msedgedriver.azureedge.net/${EdgeDriverLatestV $EdgeDriverArchPath = Start-DownloadWithRetry -Url $EdgeDriverDownloadUrl -Name $EdgeDriverArchName Write-Host "Expand Microsoft Edge WebDriver archive..." -Extract-7Zip -Path $EdgeDriverArchPath -DestinationPath $EdgeDriverPath +Expand-7ZipArchiverchive -Path $EdgeDriverArchPath -DestinationPath $EdgeDriverPath #Validate the EdgeDriver signature $EdgeDriverSignatureThumbprint = "CB9C4FBEA1D87D2D468AC5A9CAAB0163F6AD8401" diff --git a/images/windows/scripts/build/Install-Firefox.ps1 b/images/windows/scripts/build/Install-Firefox.ps1 index 0a66f0d7cee5..d4fbe0bdf6a7 100644 --- a/images/windows/scripts/build/Install-Firefox.ps1 +++ b/images/windows/scripts/build/Install-Firefox.ps1 @@ -48,7 +48,7 @@ $GeckoDriverDownloadUrl = $GeckoDriverWindowsAsset.browser_download_url $GeckoDriverArchPath = Start-DownloadWithRetry -Url $GeckoDriverDownloadUrl -Name $GeckoDriverArchName Write-Host "Expand Gecko WebDriver archive..." -Extract-7Zip -Path $GeckoDriverArchPath -DestinationPath $GeckoDriverPath +Expand-7ZipArchive -Path $GeckoDriverArchPath -DestinationPath $GeckoDriverPath # Validate Gecko WebDriver signature $GeckoDriverSignatureThumbprint = "1326B39C3D5D2CA012F66FB439026F7B59CB1974" diff --git a/images/windows/scripts/build/Install-IEWebDriver.ps1 b/images/windows/scripts/build/Install-IEWebDriver.ps1 index dac9756e9641..e40f1e8ee706 100644 --- a/images/windows/scripts/build/Install-IEWebDriver.ps1 +++ b/images/windows/scripts/build/Install-IEWebDriver.ps1 @@ -26,7 +26,7 @@ if (-not (Test-Path -Path $ieDriverPath)) { $null = New-Item -Path $ieDriverPath -ItemType Directory -Force } -Extract-7Zip -Path $driverZipFile -DestinationPath $ieDriverPath +Expand-7ZipArchive -Path $driverZipFile -DestinationPath $ieDriverPath Remove-Item $driverZipFile Write-Host "Get the IEDriver version..." diff --git a/images/windows/scripts/build/Install-JavaTools.ps1 b/images/windows/scripts/build/Install-JavaTools.ps1 index 084d23d97e65..a20e3ee4063a 100644 --- a/images/windows/scripts/build/Install-JavaTools.ps1 +++ b/images/windows/scripts/build/Install-JavaTools.ps1 @@ -89,7 +89,7 @@ function Install-JavaJDK { New-Item -ItemType Directory -Path $javaVersionPath -Force | Out-Null # Complete the installation by extracting Java binaries to toolcache and creating the complete file - Extract-7Zip -Path $archivePath -DestinationPath $javaVersionPath + Expand-7ZipArchive -Path $archivePath -DestinationPath $javaVersionPath Invoke-SBWithRetry -Command { Get-ChildItem -Path $javaVersionPath | Rename-Item -NewName $javaArchPath -ErrorAction Stop } @@ -141,7 +141,7 @@ $coberturaPath = "C:\cobertura-2.1.1" $archivePath = Start-DownloadWithRetry -Url $uri -Name "cobertura.zip" $fileHash = (Get-FileHash -Path $archivePath -Algorithm SHA256).Hash Use-ChecksumComparison $fileHash $sha256sum -Extract-7Zip -Path $archivePath -DestinationPath "C:\" +Expand-7ZipArchive -Path $archivePath -DestinationPath "C:\" [Environment]::SetEnvironmentVariable("COBERTURA_HOME", $coberturaPath, "Machine") diff --git a/images/windows/scripts/build/Install-Kotlin.ps1 b/images/windows/scripts/build/Install-Kotlin.ps1 index 6558680dc4ee..548ce941a260 100644 --- a/images/windows/scripts/build/Install-Kotlin.ps1 +++ b/images/windows/scripts/build/Install-Kotlin.ps1 @@ -19,7 +19,7 @@ Use-ChecksumComparison $fileHash $externalHash Write-Host "Expand Kotlin archive" $kotlinPath = "C:\tools" -Extract-7Zip -Path $kotlinInstallerPath -DestinationPath $kotlinPath +Expand-7ZipArchive -Path $kotlinInstallerPath -DestinationPath $kotlinPath # Add to PATH Add-MachinePathItem "$kotlinPath\kotlinc\bin" diff --git a/images/windows/scripts/build/Install-Mingw64.ps1 b/images/windows/scripts/build/Install-Mingw64.ps1 index f1bd5f685730..4c55d1a74e15 100644 --- a/images/windows/scripts/build/Install-Mingw64.ps1 +++ b/images/windows/scripts/build/Install-Mingw64.ps1 @@ -23,7 +23,7 @@ if (Test-IsWin19) { if ($hash.Hash -ne $sha256sum) { throw "Checksum verification failed for $packagePath" } - Extract-7Zip -Path $packagePath -DestinationPath "C:\" + Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\" # Make a copy of mingw-make.exe to make.exe, which is a more discoverable name # and so the same command line can be used on Windows as on macOS and Linux @@ -58,7 +58,7 @@ if (Test-IsWin19) { -UrlFilter "*$arch-{Version}-release-$threads-$exceptions-$runtime-*.7z" $packagePath = Start-DownloadWithRetry -Url $url -Name "$_.7z" - Extract-7Zip -Path $packagePath -DestinationPath "C:\" + Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\" # Make a copy of mingw-make.exe to make.exe, which is a more discoverable name # and so the same command line can be used on Windows as on macOS and Linux diff --git a/images/windows/scripts/build/Install-PyPy.ps1 b/images/windows/scripts/build/Install-PyPy.ps1 index 8fdf513e41ac..1fb8d0360b28 100644 --- a/images/windows/scripts/build/Install-PyPy.ps1 +++ b/images/windows/scripts/build/Install-PyPy.ps1 @@ -21,7 +21,7 @@ function Install-PyPy # Expand archive with binaries $packageName = [IO.Path]::GetFileNameWithoutExtension((Split-Path -Path $packagePath -Leaf)) $tempFolder = Join-Path -Path $pypyToolcachePath -ChildPath $packageName - Extract-7Zip -Path $packagePath -DestinationPath $pypyToolcachePath + Expand-7ZipArchive -Path $packagePath -DestinationPath $pypyToolcachePath # Get Python version from binaries $pypyApp = Get-ChildItem -Path "$tempFolder\pypy*.exe" | Where-Object Name -match "pypy(\d+)?.exe" | Select-Object -First 1 diff --git a/images/windows/scripts/build/Install-Ruby.ps1 b/images/windows/scripts/build/Install-Ruby.ps1 index 5396edf667ce..a0869d9599de 100644 --- a/images/windows/scripts/build/Install-Ruby.ps1 +++ b/images/windows/scripts/build/Install-Ruby.ps1 @@ -48,7 +48,7 @@ function Install-Ruby { # Expand archive with binaries $packageName = [IO.Path]::GetFileNameWithoutExtension((Split-Path -Path $PackagePath -Leaf)) $tempFolder = Join-Path -Path $rubyToolcachePath -ChildPath $packageName - Extract-7Zip -Path $PackagePath -DestinationPath $rubyToolcachePath + Expand-7ZipArchive -Path $PackagePath -DestinationPath $rubyToolcachePath # Get Ruby version from binaries $rubyVersion = & "$tempFolder\bin\ruby.exe" -e "print RUBY_VERSION" diff --git a/images/windows/scripts/build/Install-Stack.ps1 b/images/windows/scripts/build/Install-Stack.ps1 index 95cb35a284ba..98c84ac07522 100644 --- a/images/windows/scripts/build/Install-Stack.ps1 +++ b/images/windows/scripts/build/Install-Stack.ps1 @@ -23,7 +23,7 @@ Use-ChecksumComparison $fileHash $externalHash #endregion Write-Host "Expand stack archive" -Extract-7Zip -Path $StackArchivePath -DestinationPath $DestinationPath +Expand-7ZipArchive -Path $StackArchivePath -DestinationPath $DestinationPath New-Item -Name "x64.complete" -Path $StackToolcachePath diff --git a/images/windows/scripts/build/Install-Toolset.ps1 b/images/windows/scripts/build/Install-Toolset.ps1 index be13e850af7d..09c2bac85dcc 100644 --- a/images/windows/scripts/build/Install-Toolset.ps1 +++ b/images/windows/scripts/build/Install-Toolset.ps1 @@ -19,10 +19,10 @@ Function Install-Asset { Write-Host "Extract $($ReleaseAsset.filename) content..." if ($assetArchivePath.EndsWith(".tar.gz")) { $assetTarPath = $assetArchivePath.TrimEnd(".tar.gz") - Extract-7Zip -Path $assetArchivePath -DestinationPath $assetTarPath - Extract-7Zip -Path $assetTarPath -DestinationPath $assetFolderPath + Expand-7ZipArchive -Path $assetArchivePath -DestinationPath $assetTarPath + Expand-7ZipArchive -Path $assetTarPath -DestinationPath $assetFolderPath } else { - Extract-7Zip -Path $assetArchivePath -DestinationPath $assetFolderPath + Expand-7ZipArchive -Path $assetArchivePath -DestinationPath $assetFolderPath } Write-Host "Invoke installation script..." @@ -55,4 +55,4 @@ foreach ($tool in $tools) { exit 1 } } -} \ No newline at end of file +} diff --git a/images/windows/scripts/build/Install-Zstd.ps1 b/images/windows/scripts/build/Install-Zstd.ps1 index d0481ef556ce..97d44b56d701 100644 --- a/images/windows/scripts/build/Install-Zstd.ps1 +++ b/images/windows/scripts/build/Install-Zstd.ps1 @@ -14,12 +14,12 @@ $zstdParentName = [IO.Path]::GetFileNameWithoutExtension($zstdLatest) $filesInArchive = 7z l $zstdArchivePath | Out-String if ($filesInArchive.Contains($zstdParentName)) { - Extract-7Zip -Path $zstdArchivePath -DestinationPath $toolPath + Expand-7ZipArchive -Path $zstdArchivePath -DestinationPath $toolPath Invoke-SBWithRetry -Command { Move-Item -Path "${zstdPath}*" -Destination $zstdPath -ErrorAction Stop } } else { - Extract-7Zip -Path $zstdArchivePath -DestinationPath $zstdPath + Expand-7ZipArchive -Path $zstdArchivePath -DestinationPath $zstdPath } # Add zstd-win64 to PATH diff --git a/images/windows/scripts/helpers/ImageHelpers.psm1 b/images/windows/scripts/helpers/ImageHelpers.psm1 index 4435792f96a2..adfd2d8f0ee0 100644 --- a/images/windows/scripts/helpers/ImageHelpers.psm1 +++ b/images/windows/scripts/helpers/ImageHelpers.psm1 @@ -38,7 +38,7 @@ Export-ModuleMember -Function @( 'Send-RequestToCocolateyPackages' 'Resolve-ChocoPackageVersion' 'Get-GitHubPackageDownloadUrl' - 'Extract-7Zip' + 'Expand-7ZipArchive' 'Invoke-SBWithRetry' 'Get-VsCatalogJsonPath' 'Install-AndroidSDKPackages' diff --git a/images/windows/scripts/helpers/InstallHelpers.ps1 b/images/windows/scripts/helpers/InstallHelpers.ps1 index bf06e17e41a7..d0f31c8e5ed4 100644 --- a/images/windows/scripts/helpers/InstallHelpers.ps1 +++ b/images/windows/scripts/helpers/InstallHelpers.ps1 @@ -471,7 +471,7 @@ function Test-IsWin19 (Get-WinVersion) -match "2019" } -function Extract-7Zip { +function Expand-7ZipArchive { Param ( [Parameter(Mandatory=$true)] From 7cadc3cff0ceb07ad8c228cbb76a17c1bb35b38b Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov Date: Wed, 22 Nov 2023 21:07:31 +0100 Subject: [PATCH 2/2] Fix typo --- images/windows/scripts/build/Install-EdgeDriver.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/windows/scripts/build/Install-EdgeDriver.ps1 b/images/windows/scripts/build/Install-EdgeDriver.ps1 index 6dd6eae18ea5..5eacdf463632 100644 --- a/images/windows/scripts/build/Install-EdgeDriver.ps1 +++ b/images/windows/scripts/build/Install-EdgeDriver.ps1 @@ -31,7 +31,7 @@ $EdgeDriverDownloadUrl = "https://msedgedriver.azureedge.net/${EdgeDriverLatestV $EdgeDriverArchPath = Start-DownloadWithRetry -Url $EdgeDriverDownloadUrl -Name $EdgeDriverArchName Write-Host "Expand Microsoft Edge WebDriver archive..." -Expand-7ZipArchiverchive -Path $EdgeDriverArchPath -DestinationPath $EdgeDriverPath +Expand-7ZipArchive -Path $EdgeDriverArchPath -DestinationPath $EdgeDriverPath #Validate the EdgeDriver signature $EdgeDriverSignatureThumbprint = "CB9C4FBEA1D87D2D468AC5A9CAAB0163F6AD8401"