Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
107a8cc
Add win11-arm template and toolset
shamil-mubarakshin Mar 16, 2026
4b60db6
Update Install Helpers
shamil-mubarakshin Mar 16, 2026
81627de
Modify codebase to support Arm
shamil-mubarakshin Mar 18, 2026
20afed4
Fix source_image_marketplace_sku
shamil-mubarakshin Mar 18, 2026
d9157b4
DEBUG: elevated packer, add SeBatchLogonRight
shamil-mubarakshin Mar 19, 2026
c0d2ad3
DEBUG:V2 elevated packer, add SeBatchLogonRight
shamil-mubarakshin Mar 19, 2026
12bdc44
DEBUG:V3 elevated packer, test auto logon
shamil-mubarakshin Mar 20, 2026
614b8c5
DEBUG:V3 elevated packer, test auto logon with reboot
shamil-mubarakshin Mar 20, 2026
a0d26c5
Remove Install-ServiceFabricSDK.ps1
shamil-mubarakshin Mar 20, 2026
1d8b7e6
Fix Install-Rust.ps1
shamil-mubarakshin Mar 20, 2026
23dd906
TEMP: remove cargo-audit
shamil-mubarakshin Mar 21, 2026
ca62df3
Fix Install-Firefox.ps1 asset names
shamil-mubarakshin Mar 21, 2026
b809ada
Patch web browser scripts
shamil-mubarakshin Mar 22, 2026
5acc332
Fix pester tests
shamil-mubarakshin Mar 22, 2026
c7fea09
Fix Install-Ruby.ps1
shamil-mubarakshin Mar 22, 2026
45f33fa
Fix Haskell.Tests.ps1
shamil-mubarakshin Mar 22, 2026
4407a2e
DEBUG: output windows updates state
shamil-mubarakshin Mar 23, 2026
c94f45a
Skip MicrosoftWindows.Client.WebExperience update fails
shamil-mubarakshin Mar 23, 2026
29ae1b4
Fix Build-PackageManagementEnvironmentTable
shamil-mubarakshin Mar 24, 2026
52a499f
Revert "TEMP: remove cargo-audit"
shamil-mubarakshin Mar 24, 2026
eaf680b
Cleanup code
shamil-mubarakshin Mar 24, 2026
fb1b0dd
Fix LLVM install sequence
shamil-mubarakshin Mar 24, 2026
c88da39
Add win11-vs2026-arm64 code
shamil-mubarakshin Mar 24, 2026
952ac23
remove vs workloads
shamil-mubarakshin Mar 24, 2026
bb7bd55
Add win11-arm template and toolset
shamil-mubarakshin Mar 16, 2026
65410c8
Update Install Helpers
shamil-mubarakshin Mar 16, 2026
045b85c
Modify codebase to support Arm
shamil-mubarakshin Mar 18, 2026
46988f3
Fix source_image_marketplace_sku
shamil-mubarakshin Mar 18, 2026
649e7dc
DEBUG: elevated packer, add SeBatchLogonRight
shamil-mubarakshin Mar 19, 2026
84ef25f
DEBUG:V2 elevated packer, add SeBatchLogonRight
shamil-mubarakshin Mar 19, 2026
aff033d
DEBUG:V3 elevated packer, test auto logon
shamil-mubarakshin Mar 20, 2026
056c081
DEBUG:V3 elevated packer, test auto logon with reboot
shamil-mubarakshin Mar 20, 2026
fc73540
Remove Install-ServiceFabricSDK.ps1
shamil-mubarakshin Mar 20, 2026
55b3795
Fix Install-Rust.ps1
shamil-mubarakshin Mar 20, 2026
a464377
TEMP: remove cargo-audit
shamil-mubarakshin Mar 21, 2026
811ac68
Fix Install-Firefox.ps1 asset names
shamil-mubarakshin Mar 21, 2026
ec19008
Patch web browser scripts
shamil-mubarakshin Mar 22, 2026
eb9ce8b
Fix pester tests
shamil-mubarakshin Mar 22, 2026
b5c33c4
Fix Install-Ruby.ps1
shamil-mubarakshin Mar 22, 2026
6d309df
Fix Haskell.Tests.ps1
shamil-mubarakshin Mar 22, 2026
3ce8ab8
DEBUG: output windows updates state
shamil-mubarakshin Mar 23, 2026
1d04e42
Skip MicrosoftWindows.Client.WebExperience update fails
shamil-mubarakshin Mar 23, 2026
1ce128c
Fix Build-PackageManagementEnvironmentTable
shamil-mubarakshin Mar 24, 2026
e9bec78
Revert "TEMP: remove cargo-audit"
shamil-mubarakshin Mar 24, 2026
18fec92
Cleanup code
shamil-mubarakshin Mar 24, 2026
9c0fdaa
Fix LLVM install sequence
shamil-mubarakshin Mar 24, 2026
f422691
Add win11-vs2026-arm64 code
shamil-mubarakshin Mar 24, 2026
1613b62
remove vs workloads
shamil-mubarakshin Mar 24, 2026
aaa3859
Fix BaseImage and ImageDataFile scripts
shamil-mubarakshin Apr 2, 2026
1ce4c20
Merge branch 'shamilm/add-win11-arm-vs2026' of github.com:shamil-muba…
shamil-mubarakshin Apr 2, 2026
caa84c5
OS Helper overhaul: add x64 arch variants
shamil-mubarakshin Apr 6, 2026
6304f88
OS Helper overhaul: replace function calls
shamil-mubarakshin Apr 6, 2026
6b8ec8a
OS Helper overhaul: update extra calls
shamil-mubarakshin Apr 6, 2026
87115ef
Update arch variables for install scripts
shamil-mubarakshin Apr 6, 2026
c71d41f
Add comments for AutoAdminLogon
shamil-mubarakshin Apr 6, 2026
305691a
wip: adjust rust cargo install
shamil-mubarakshin Apr 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/windows/scripts/build/Configure-BaseImage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function Disable-WindowsUpdate {
Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"'

Write-Host "Disable Server Manager on Logon"
Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask
Get-ScheduledTask -TaskName ServerManager -ErrorAction SilentlyContinue | Disable-ScheduledTask
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why it is not required for arm64.
I wonder if we want to wrap it to Test-IsArm64 instead of silentlyContinue to avoid problems.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remote Access Management Tools optional feature is not enabled on windows-11


Write-Host "Disable 'Allow your PC to be discoverable by other PCs' popup"
New-Item -Path HKLM:\System\CurrentControlSet\Control\Network -Name NewNetworkWindowOff -Force
Expand Down
16 changes: 12 additions & 4 deletions images/windows/scripts/build/Configure-ImageDataFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,28 @@ $imageMinorVersion = $imageVersionComponents[1]
$imageDataFile = $env:IMAGEDATA_FILE
$githubUrl = "https://github.com/actions/runner-images/blob"

if ((Test-IsWin25) -and $env:INSTALL_VS_2026) {
if ((Test-IsWin25-X64) -and $env:INSTALL_VS_2026) {
$imageLabel = "windows-2025-vs2026"
$softwareUrl = "${githubUrl}/win25-vs2026/$imageMajorVersion.$imageMinorVersion/images/windows/Windows2025-VS2026-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win25-vs2026%2F$imageMajorVersion.$imageMinorVersion"
} elseif (Test-IsWin25) {
} elseif (Test-IsWin25-X64) {
$imageLabel = "windows-2025"
$softwareUrl = "${githubUrl}/win25/$imageMajorVersion.$imageMinorVersion/images/windows/Windows2025-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win25%2F$imageMajorVersion.$imageMinorVersion"
} elseif (Test-IsWin22) {
} elseif (Test-IsWin22-X64) {
$imageLabel = "windows-2022"
$softwareUrl = "${githubUrl}/win22/$imageMajorVersion.$imageMinorVersion/images/windows/Windows2022-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win22%2F$imageMajorVersion.$imageMinorVersion"
} elseif ((Test-IsWin11-Arm64) -and $env:INSTALL_VS_2026) {
$imageLabel = "windows-11-vs2026-arm64"
$softwareUrl = "${githubUrl}/win11-vs2026-arm64/$imageMajorVersion.$imageMinorVersion/images/windows/Windows11-VS2026-Arm64-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win11-vs2026-arm64%2F$imageMajorVersion.$imageMinorVersion"
} elseif (Test-IsWin11-Arm64) {
$imageLabel = "windows-11-arm64"
$softwareUrl = "${githubUrl}/win11-arm64/$imageMajorVersion.$imageMinorVersion/images/windows/Windows11-Arm64-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win11-arm64%2F$imageMajorVersion.$imageMinorVersion"
} else {
throw "Invalid platform version is found. Either Windows Server 2022 or 2025 are required"
throw "Invalid platform version is found. Either Windows Server 2022, 2025 or Windows 11 are required"
}

$json = @"
Expand Down
4 changes: 3 additions & 1 deletion images/windows/scripts/build/Configure-Shell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
$shellPath = "C:\shells"
New-Item -Path $shellPath -ItemType Directory | Out-Null

# add a wrapper for C:\msys64\usr\bin\bash.exe
if (Test-IsX64) {
# add a wrapper for C:\msys64\usr\bin\bash.exe
@'
@echo off
setlocal
Expand All @@ -11,6 +12,7 @@ IF NOT DEFINED MSYSTEM set MSYSTEM=mingw64
set CHERE_INVOKING=1
C:\msys64\usr\bin\bash.exe -leo pipefail %*
'@ | Out-File -FilePath "$shellPath\msys2bash.cmd" -Encoding ascii
}

# gitbash <--> C:\Program Files\Git\bin\bash.exe
New-Item -ItemType SymbolicLink -Path "$shellPath\gitbash.exe" -Target "$env:ProgramFiles\Git\bin\bash.exe" | Out-Null
Expand Down
8 changes: 4 additions & 4 deletions images/windows/scripts/build/Configure-System.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Set default version to 1 for WSL (aka LXSS - Linux Subsystem)
# The value should be set in the default user registry hive
# https://github.com/actions/runner-images/issues/5760
if (Test-IsWin22) {
if (Test-IsWin22-X64) {
Write-Host "Setting WSL default version to 1"

Mount-RegistryHive `
Expand Down Expand Up @@ -37,7 +37,7 @@ if ($LASTEXITCODE -ne 0) {
}

# Enable inheritance for the entire C:\ drive
if (Test-IsWin25) {
if (Test-IsWin25-X64) {
cmd /c "icacls C:\ /inheritance:e /c /q 2>&1" | Out-Null
if ($LASTEXITCODE -ne 0) {
throw "Failed to enable inheritance for C:\ drive"
Expand Down Expand Up @@ -101,11 +101,11 @@ $servicesToDisable = @(
'wuauserv'
'DiagTrack'
'dmwappushservice'
$(if(-not (Test-IsWin25)){'PcaSvc'})
$(if(-not (Test-IsWin25-X64)){'PcaSvc'})
'SysMain'
'gupdate'
'gupdatem'
$(if(-not (Test-IsWin25)){'StorSvc'})
$(if(-not (Test-IsWin25-X64)){'StorSvc'})
) | Get-Service -ErrorAction SilentlyContinue
Stop-Service $servicesToDisable
$servicesToDisable.WaitForStatus('Stopped', "00:01:00")
Expand Down
8 changes: 7 additions & 1 deletion images/windows/scripts/build/Configure-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
## Desc: Configure Toolset
################################################################################

if ( Test-IsArm64 ) {
$envVarTemplate = "GOROOT_{0}_{1}_AARCH64"
} else {
$envVarTemplate = "GOROOT_{0}_{1}_X64"
}

$toolEnvConfigs = @{
Python = @{
pathTemplates = @(
Expand All @@ -15,7 +21,7 @@ $toolEnvConfigs = @{
pathTemplates = @(
"{0}\bin"
)
envVarTemplate = "GOROOT_{0}_{1}_X64"
envVarTemplate = $envVarTemplate
}
}

Expand Down
8 changes: 4 additions & 4 deletions images/windows/scripts/build/Configure-User.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ if ($LASTEXITCODE -ne 0) {
throw "Failed to copy HKCU\Software\Microsoft\VisualStudio to HKLM\DEFAULT\Software\Microsoft\VisualStudio"
}

# TortoiseSVN not installed on Windows 2025 image due to Sysprep issues
if (-not (Test-IsWin25)) {
# TortoiseSVN not installed on Windows 2025 and Windows 11 due to Sysprep issues
if (Test-IsWin22-X64) {
# disable TSVNCache.exe
$registryKeyPath = 'HKCU:\Software\TortoiseSVN'
if (-not(Test-Path -Path $registryKeyPath)) {
Expand All @@ -42,7 +42,7 @@ if (-not (Test-IsWin25)) {
}
}
# Accept by default "Send Diagnostic data to Microsoft" consent.
if (Test-IsWin25) {
if (Test-IsWin25-X64) {
$registryKeyPath = 'HKLM:\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy'
New-ItemProperty -Path $registryKeyPath -Name PrivacyConsentPresentationVersion -PropertyType DWORD -Value 3 | Out-Null
New-ItemProperty -Path $registryKeyPath -Name PrivacyConsentSettingsValidMask -PropertyType DWORD -Value 4 | Out-Null
Expand All @@ -52,7 +52,7 @@ if (Test-IsWin25) {
Dismount-RegistryHive "HKLM\DEFAULT"

# Remove the "installer" (var.install_user) user profile for Windows 2025 image
if (Test-IsWin25) {
if (Test-IsWin25-X64) {
Get-CimInstance -ClassName Win32_UserProfile | where-object {$_.LocalPath -match $env:INSTALL_USER} | Remove-CimInstance -Confirm:$false
& net user $env:INSTALL_USER /DELETE
}
Expand Down
10 changes: 8 additions & 2 deletions images/windows/scripts/build/Install-Apache.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
################################################################################

# Stop w3svc service
Stop-Service -Name w3svc
$w3svcService = Get-Service -Name "w3svc" -ErrorAction SilentlyContinue
if ($w3svcService) {
Stop-Service $w3svcService
}

# Install latest apache in chocolatey
$installDir = "C:\tools"
Expand All @@ -15,7 +18,10 @@ Stop-Service -Name Apache
Set-Service -Name Apache -StartupType Disabled

# Start w3svc service
Start-Service -Name w3svc
$w3svcService = Get-Service -Name "w3svc" -ErrorAction SilentlyContinue
if ($w3svcService) {
Start-Service $w3svcService
}

# Invoke Pester Tests
Invoke-PesterTests -TestFile "Apache"
31 changes: 31 additions & 0 deletions images/windows/scripts/build/Install-CMake.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
################################################################################
## File: Install-CMake.ps1
## Desc: Install CMake (ARM64 only; x64 is installed via Choco)
## Supply chain security: CMake - checksum validation
################################################################################

# Install CMake
$downloadUrl = Resolve-GithubReleaseAssetUrl `
-Repo "Kitware/CMake" `
-Version "latest" `
-UrlMatchPattern "cmake-*-windows-arm64.msi"

#region Supply chain security - CMake
$packageName = Split-Path $downloadUrl -Leaf
$checksumsUrl = Resolve-GithubReleaseAssetUrl `
-Repo "Kitware/CMake" `
-Version "latest" `
-UrlMatchPattern "cmake-*-SHA-256.txt"
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
-Url $checksumsUrl `
-FileName $packageName
#endregion

Install-Binary `
-Url $downloadUrl `
-ExtraInstallArgs @("ADD_CMAKE_TO_PATH=System") `
-ExpectedSHA256Sum $externalHash

Update-Environment

Invoke-PesterTests -TestFile "Tools" -TestName "CMake"
8 changes: 7 additions & 1 deletion images/windows/scripts/build/Install-Chrome.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
## Desc: Install Google Chrome browser and Chrome WebDriver
################################################################################

if (Test-IsArm64) {
$browserDownloadUrl = "https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise_arm64.msi"
} else {
$browserDownloadUrl = "https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi"
}

# Download and install latest Chrome browser
Install-Binary `
-Url 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi' `
-Url $browserDownloadUrl `
-ExpectedSubject 'CN=Google LLC, O=Google LLC, L=Mountain View, S=California, C=US, SERIALNUMBER=3582691, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.2=Delaware, OID.1.3.6.1.4.1.311.60.2.1.3=US'

# Prepare firewall rules
Expand Down
2 changes: 1 addition & 1 deletion images/windows/scripts/build/Install-Docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if ($LastExitCode -ne 0) {
# https://github.com/Azure/azure-cli/issues/18766
New-Item -ItemType SymbolicLink -Path "C:\Windows\SysWOW64\docker.exe" -Target "C:\Windows\System32\docker.exe"

if (-not (Test-IsWin25)) {
if (-not (Test-IsWin25-X64)) {
Write-Host "Download docker images"
$dockerImages = (Get-ToolsetContent).docker.images
foreach ($dockerImage in $dockerImages) {
Expand Down
25 changes: 13 additions & 12 deletions images/windows/scripts/build/Install-DotnetSDK.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,14 @@ function Install-DotnetSDK {
# If installation failed, tests will fail anyway

#region Supply chain security
if (Test-IsArm64) {
$dotnetArch = "arm64"
} else {
$dotnetArch = "x64"
}
$releasesJsonUri = "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/${DotnetVersion}/releases.json"
$releasesData = (Invoke-DownloadWithRetry $releasesJsonUri) | Get-Item | Get-Content | ConvertFrom-Json
$distributorFileHash = $releasesData.releases.sdks.Where({ $_.version -eq $SDKVersion }).files.Where({ $_.name -eq 'dotnet-sdk-win-x64.zip' }).hash
$distributorFileHash = $releasesData.releases.sdks.Where({ $_.version -eq $SDKVersion }).files.Where({ $_.name -eq "dotnet-sdk-win-$dotnetArch.zip" }).hash
Test-FileChecksum $zipPath -ExpectedSHA512Sum $distributorFileHash
#endregion
}
Expand All @@ -97,11 +102,9 @@ $installScriptPath = Invoke-DownloadWithRetry -Url "https://dot.net/v1/dotnet-in

# Visual Studio 2022 pre-creates sdk-manifests/8.0.100 folder, causing dotnet-install to skip manifests creation
# https://github.com/actions/runner-images/issues/11402
if ((Test-IsWin22) -or (Test-IsWin25)) {
$sdkManifestPath = "C:\Program Files\dotnet\sdk-manifests\8.0.100"
if (Test-Path $sdkManifestPath) {
Move-Item -Path $sdkManifestPath -Destination $env:TEMP_DIR -ErrorAction Stop
}
$sdkManifestPath = "C:\Program Files\dotnet\sdk-manifests\8.0.100"
if (Test-Path $sdkManifestPath) {
Move-Item -Path $sdkManifestPath -Destination $env:TEMP_DIR -ErrorAction Stop
}

# Install and warm up dotnet
Expand All @@ -122,12 +125,10 @@ foreach ($dotnetVersion in $dotnetToolset.versions) {

# Replace manifests inside sdk-manifests/8.0.100 folder with ones from Visual Studio
# https://github.com/actions/runner-images/issues/11402
if ((Test-IsWin22) -or (Test-IsWin25)) {
if (Test-Path "${env:TEMP_DIR}\8.0.100") {
Get-ChildItem -Path "${env:TEMP_DIR}\8.0.100" | ForEach-Object {
Remove-Item -Path "$sdkManifestPath\$($_.BaseName)" -Recurse -Force | Out-Null
Move-Item -Path $_.FullName -Destination $sdkManifestPath -Force -ErrorAction Stop
}
if (Test-Path "${env:TEMP_DIR}\8.0.100") {
Get-ChildItem -Path "${env:TEMP_DIR}\8.0.100" | ForEach-Object {
Remove-Item -Path "$sdkManifestPath\$($_.BaseName)" -Recurse -Force | Out-Null
Move-Item -Path $_.FullName -Destination $sdkManifestPath -Force -ErrorAction Stop
}
}

Expand Down
8 changes: 7 additions & 1 deletion images/windows/scripts/build/Install-EdgeDriver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## Desc: Install Edge WebDriver and configure Microsoft Edge
################################################################################

if (Test-IsArm64) {
$driverArch = "arm64"
} else {
$driverArch = "win64"
}

# Disable Edge auto-updates
Rename-Item -Path "C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" -NewName "Disabled_MicrosoftEdgeUpdate.exe" -ErrorAction Stop

Expand All @@ -20,7 +26,7 @@ $versionInfoFile = Invoke-DownloadWithRetry -Url $versionInfoUrl -Path "$edgeDri
$latestVersion = Get-Content -Path $versionInfoFile

Write-Host "Download Microsoft Edge WebDriver..."
$downloadUrl = "https://msedgedriver.microsoft.com/$latestVersion/edgedriver_win64.zip"
$downloadUrl = "https://msedgedriver.microsoft.com/$latestVersion/edgedriver_$driverArch.zip"
$archivePath = Invoke-DownloadWithRetry $downloadUrl

Write-Host "Expand Microsoft Edge WebDriver archive..."
Expand Down
14 changes: 11 additions & 3 deletions images/windows/scripts/build/Install-Firefox.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@
## Supply chain security: Firefox browser - checksum validation
################################################################################

if (Test-IsArm64) {
$browserArch = "win64-aarch64"
$driverArch = "win-aarch64"
} else {
$browserArch = "win64"
$driverArch = "win64"
}

# Install and configure Firefox browser
Write-Host "Get the latest Firefox version..."
$versionsManifest = Invoke-RestMethod "https://product-details.mozilla.org/1.0/firefox_versions.json"

Write-Host "Install Firefox browser..."
$installerUrl = "https://download.mozilla.org/?product=firefox-$($versionsManifest.LATEST_FIREFOX_VERSION)&os=win64&lang=en-US"
$installerUrl = "https://download.mozilla.org/?product=firefox-$($versionsManifest.LATEST_FIREFOX_VERSION)&os=$browserArch&lang=en-US"
$hashUrl = "https://archive.mozilla.org/pub/firefox/releases/$($versionsManifest.LATEST_FIREFOX_VERSION)/SHA256SUMS"

$externalHash = Get-ChecksumFromUrl -Type "SHA256" `
-Url $hashUrl `
-FileName "win64/en-US/Firefox Setup*exe"
-FileName "$browserArch/en-US/Firefox Setup*exe"

Install-Binary -Type EXE `
-Url $installerUrl `
Expand Down Expand Up @@ -46,7 +54,7 @@ Write-Host "Download Gecko WebDriver WebDriver..."
$geckoDriverDownloadUrl = Resolve-GithubReleaseAssetUrl `
-Repo "mozilla/geckodriver" `
-Version $geckoDriverVersion `
-UrlMatchPattern "geckodriver-*-win64.zip"
-UrlMatchPattern "geckodriver-*-$driverArch.zip"
$geckoDriverArchPath = Invoke-DownloadWithRetry $geckoDriverDownloadUrl

Write-Host "Expand Gecko WebDriver archive..."
Expand Down
9 changes: 7 additions & 2 deletions images/windows/scripts/build/Install-Git.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
## Supply chain security: Git - checksum validation, Hub CLI - managed by package manager
################################################################################

# Install the latest version of Git for Windows
if (Test-IsArm64) {
$gitArch = "arm64"
} else {
$gitArch = "64-bit"
}

# Install the latest version of Git for Windows
$downloadUrl = Resolve-GithubReleaseAssetUrl `
-Repo "git-for-windows/git" `
-Version "latest" `
-UrlMatchPattern "Git-*-64-bit.exe"
-UrlMatchPattern "Git-*-$gitArch.exe"

$externalHash = Get-ChecksumFromGithubRelease `
-Repo "git-for-windows/git" `
Expand Down
9 changes: 7 additions & 2 deletions images/windows/scripts/build/Install-GitHub-CLI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
## Supply chain security: GitHub CLI - checksum validation
################################################################################

Write-Host "Get the latest gh version..."
if (Test-IsArm64) {
$ghArch = "arm64"
} else {
$ghArch = "amd64"
}

Write-Host "Get the latest gh version..."
$downloadUrl = Resolve-GithubReleaseAssetUrl `
-Repo "cli/cli" `
-Version "latest" `
-UrlMatchPattern "gh_*_windows_amd64.msi"
-UrlMatchPattern "gh_*_windows_$ghArch.msi"

$checksumsUrl = Resolve-GithubReleaseAssetUrl `
-Repo "cli/cli" `
Expand Down
2 changes: 1 addition & 1 deletion images/windows/scripts/build/Install-Haskell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add-MachinePathItem "$cabalDir\bin"
Update-Environment

# Get 1 or 3 latest versions of GHC depending on the OS version
If (Test-IsWin25) {
If (Test-IsWin25-X64) {
$numberOfVersions = 1
} else {
$numberOfVersions = 3
Expand Down
Loading
Loading