mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 12:06:59 +00:00
[Windows] Rename image build scripts (#8808)
This commit is contained in:
committed by
GitHub
parent
f78a7baa80
commit
0263bdd53e
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Initialize-VM.ps1
|
||||
## Desc: VM initialization script, machine level configuration
|
||||
## File: Configure-BaseImage.ps1
|
||||
## Desc: Prepare the base image for software installation
|
||||
################################################################################
|
||||
|
||||
function Disable-InternetExplorerESC {
|
||||
@@ -11,7 +11,7 @@ function Disable-InternetExplorerESC {
|
||||
|
||||
$ieProcess = Get-Process -Name Explorer -ErrorAction SilentlyContinue
|
||||
|
||||
if ($ieProcess){
|
||||
if ($ieProcess) {
|
||||
Stop-Process -Name Explorer -Force -ErrorAction Continue
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ Write-Host "Disable IE ESC"
|
||||
Disable-InternetExplorerESC
|
||||
|
||||
Write-Host "Setting local execution policy"
|
||||
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -ErrorAction Continue | Out-Null
|
||||
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -ErrorAction Continue | Out-Null
|
||||
Get-ExecutionPolicy -List
|
||||
|
||||
Write-Host "Enable long path behavior"
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
## File: Enable-DeveloperMode.ps1
|
||||
## File: Configure-DeveloperMode.ps1
|
||||
## Desc: Enables Developer Mode by toggling registry setting. Developer Mode is required to enable certain tools (e.g. WinAppDriver).
|
||||
################################################################################
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Configure-Diagnostics.ps1
|
||||
## Desc: Disables Just-In-Time Debugger and Windows Error Reporting
|
||||
################################################################################
|
||||
|
||||
Write-Host "Disable Just-In-Time Debugger"
|
||||
|
||||
# Turn off Application Error Debugger
|
||||
@@ -13,4 +18,4 @@ New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting
|
||||
# Send all reports to the user's queue
|
||||
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name ForceQueue -Value 1 -Type DWORD -Force
|
||||
# Default consent choice 1 - Always ask (default)
|
||||
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent" -Name DefaultConsent -Value 1 -Type DWORD -Force
|
||||
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent" -Name DefaultConsent -Value 1 -Type DWORD -Force
|
||||
@@ -1,16 +1,16 @@
|
||||
################################################################################
|
||||
## File: Update-DotnetTLS.ps1
|
||||
## Desc: Update DotNetFramework security protocol to TLS 1.2
|
||||
## File: Configure-DotnetSecureChannel.ps1
|
||||
## Desc: Configure .NET to use TLS 1.2
|
||||
################################################################################
|
||||
|
||||
$registryPath = "HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319"
|
||||
$name = "SchUseStrongCrypto"
|
||||
$value = "1"
|
||||
if(Test-Path $registryPath){
|
||||
if (Test-Path $registryPath) {
|
||||
Set-ItemProperty -Path $registryPath -Name $name -Value $value -Type DWORD
|
||||
}
|
||||
|
||||
$registryPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319"
|
||||
if(Test-Path $registryPath){
|
||||
if (Test-Path $registryPath) {
|
||||
Set-ItemProperty -Path $registryPath -Name $name -Value $value -Type DWORD
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Configure-ImageDataFile.ps1
|
||||
## Desc: Creates a JSON file with information about the image
|
||||
################################################################################
|
||||
|
||||
$os = Get-CimInstance -ClassName Win32_OperatingSystem
|
||||
$caption = $os.Caption
|
||||
$osName = $caption.Substring(0, $caption.LastIndexOf(" "))
|
||||
@@ -36,10 +41,3 @@ $json = @"
|
||||
"@
|
||||
|
||||
$json | Out-File -FilePath $imageDataFile
|
||||
|
||||
|
||||
# Set static env vars
|
||||
setx ImageVersion $env:IMAGE_VERSION /m
|
||||
setx ImageOS $env:IMAGE_OS /m
|
||||
setx AGENT_TOOLSDIRECTORY $env:AGENT_TOOLSDIRECTORY /m
|
||||
setx ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE /m
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Finalize-VM.ps1
|
||||
## Desc: Clean up temp folders after installs to save space
|
||||
## File: Configure-System.ps1
|
||||
## Desc: Applies various configuration settings to the final image
|
||||
################################################################################
|
||||
|
||||
Write-Host "Cleanup WinSxS"
|
||||
@@ -46,24 +46,24 @@ cmd /c "icacls $env:SystemRoot\Temp /grant Users:f /t /c /q 2>&1" | Out-Null
|
||||
|
||||
# Registry settings
|
||||
$registrySettings = @(
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "AUOptions"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "NoAutoUpdate"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"; Name = "DoNotConnectToWindowsUpdateInternetLocations"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"; Name = "DisableWindowsUpdateAccess"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata"; Name = "PreventDeviceMetadataFromNetwork"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows"; Name = "CEIPEnable"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat"; Name = "AITEnable"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat"; Name = "DisableUAR"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\Software\Policies\Microsoft\Windows\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance"; Name = "MaintenanceDisabled"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\MRT"; Name = "DontOfferThroughWUAU"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\MRT"; Name = "DontReportInfectionInformation"; Value = 1; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"; Name = "AllowCortana"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control"; Name = "ServicesPipeTimeout"; Value = 120000; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener"; Name = "Start"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger"; Name = "Start"; Value = 0; PropertyType = "DWORD"}
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "AUOptions"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"; Name = "NoAutoUpdate"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"; Name = "DoNotConnectToWindowsUpdateInternetLocations"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"; Name = "DisableWindowsUpdateAccess"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata"; Name = "PreventDeviceMetadataFromNetwork"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows"; Name = "CEIPEnable"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat"; Name = "AITEnable"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat"; Name = "DisableUAR"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\Software\Policies\Microsoft\Windows\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\DataCollection"; Name = "AllowTelemetry"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance"; Name = "MaintenanceDisabled"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\MRT"; Name = "DontOfferThroughWUAU"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\MRT"; Name = "DontReportInfectionInformation"; Value = 1; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"; Name = "AllowCortana"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control"; Name = "ServicesPipeTimeout"; Value = 120000; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener"; Name = "Start"; Value = 0; PropertyType = "DWORD" }
|
||||
@{Path = "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger"; Name = "Start"; Value = 0; PropertyType = "DWORD" }
|
||||
)
|
||||
|
||||
$registrySettings | ForEach-Object {
|
||||
@@ -139,9 +139,9 @@ $allTasksInTaskPath | ForEach-Object {
|
||||
} | Out-Null
|
||||
|
||||
$disableTaskNames = @(
|
||||
@{TaskPath = "\Microsoft\Windows\.NET Framework\"; TaskName = ".NET Framework NGEN v4.0.30319"}
|
||||
@{TaskPath = "\Microsoft\Windows\.NET Framework\"; TaskName = ".NET Framework NGEN v4.0.30319 64"}
|
||||
@{TaskPath = "\Microsoft\Windows\AppID\"; TaskName = "SmartScreenSpecific"}
|
||||
@{TaskPath = "\Microsoft\Windows\.NET Framework\"; TaskName = ".NET Framework NGEN v4.0.30319" }
|
||||
@{TaskPath = "\Microsoft\Windows\.NET Framework\"; TaskName = ".NET Framework NGEN v4.0.30319 64" }
|
||||
@{TaskPath = "\Microsoft\Windows\AppID\"; TaskName = "SmartScreenSpecific" }
|
||||
)
|
||||
|
||||
$disableTaskNames | ForEach-Object {
|
||||
@@ -0,0 +1,9 @@
|
||||
################################################################################
|
||||
## File: Configure-SystemEnvironment.ps1
|
||||
## Desc: Configures system environment variables
|
||||
################################################################################
|
||||
|
||||
setx ImageVersion $env:IMAGE_VERSION /m
|
||||
setx ImageOS $env:IMAGE_OS /m
|
||||
setx AGENT_TOOLSDIRECTORY $env:AGENT_TOOLSDIRECTORY /m
|
||||
setx ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE /m
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
## File: Warmup-User.ps1
|
||||
## File: Configure-User.ps1
|
||||
## Desc: Performs user part of warm up and moves data to C:\Users\Default
|
||||
################################################################################
|
||||
|
||||
@@ -31,4 +31,4 @@ New-ItemProperty -Path $RegistryKeyPath -Name CacheType -PropertyType DWORD -Val
|
||||
reg.exe copy HKCU\Software\TortoiseSVN HKLM\DEFAULT\Software\TortoiseSVN /s
|
||||
|
||||
reg.exe unload HKLM\DEFAULT
|
||||
Write-Host "Warmup-User.ps1 - completed"
|
||||
Write-Host "Configure-User.ps1 - completed"
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Configure-WindowsDefender.ps1
|
||||
## Desc: Disables Windows Defender
|
||||
################################################################################
|
||||
|
||||
Write-Host "Disable Windows Defender..."
|
||||
$avPreference = @(
|
||||
@{DisableArchiveScanning = $true}
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-AWS.ps1
|
||||
## Desc: Install AWS tools(AWS CLI, Session Manager Plugin for the AWS CLI, AWS SAM CLI)
|
||||
## File: Install-AWSTools.ps1
|
||||
## Desc: Install AWS tools: CLI, Session Manager Plugin, AWS SAM CLI
|
||||
## Supply chain security: AWS CLI - managed by package manager, Session Manager Plugin for the AWS CLI - missing, AWS SAM CLI - checksum validation
|
||||
################################################################################
|
||||
|
||||
@@ -11,7 +11,7 @@ Choco-Install -PackageName awscli
|
||||
$sessionManagerName = "SessionManagerPluginSetup.exe"
|
||||
$sessionManagerUrl = "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/$sessionManagerName"
|
||||
$sessionManagerSignatureThumbprint = "FF457E5732E98A9F156E657F8CC7C4432507C3BB"
|
||||
Install-Binary -Url $sessionManagerUrl -Name $sessionManagerName -ArgumentList ("/silent", "/install") -ExpectedSignature $sessionManagerSignatureThumbprint
|
||||
Install-Binary -Url $sessionManagerUrl -Name $sessionManagerName -ArgumentList ("/silent", "/install") -ExpectedSignature $sessionManagerSignatureThumbprint
|
||||
$env:Path = $env:Path + ";$env:ProgramFiles\Amazon\SessionManagerPlugin\bin"
|
||||
|
||||
# Install AWS SAM CLI
|
||||
@@ -1,12 +1,10 @@
|
||||
################################################################################
|
||||
## File: Install-ActionArchiveCache.ps1
|
||||
## Desc: Download latest release from https://github.com/actions/action-versions
|
||||
## and un-zip to C:\actionarchivecache
|
||||
## File: Install-ActionsCache.ps1
|
||||
## Desc: Downloads latest release from https://github.com/actions/action-versions
|
||||
## Maintainer: #actions-runtime and @TingluoHuang
|
||||
################################################################################
|
||||
|
||||
if (-not (Test-Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE))
|
||||
{
|
||||
if (-not (Test-Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE)) {
|
||||
Write-Host "Creating action archive cache folder"
|
||||
New-Item -ItemType Directory -Path $env:ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE | Out-Null
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-AzureCli.ps1
|
||||
## Desc: Install Azure CLI
|
||||
## Desc: Install and warm-up Azure CLI
|
||||
################################################################################
|
||||
|
||||
Write-Host 'Install the latest Azure CLI release'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Install-Chocolatey.ps1
|
||||
## Desc: Install Chocolatey package manager
|
||||
################################################################################
|
||||
|
||||
Write-Host "Set TLS1.2"
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
||||
|
||||
12
images/windows/scripts/build/Install-ChocolateyPackages.ps1
Normal file
12
images/windows/scripts/build/Install-ChocolateyPackages.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
## File: Install-ChocolateyPackages.ps1
|
||||
## Desc: Install common Chocolatey packages
|
||||
################################################################################
|
||||
|
||||
$commonPackages = (Get-ToolsetContent).choco.common_packages
|
||||
|
||||
foreach ($package in $commonPackages) {
|
||||
Choco-Install -PackageName $package.name -ArgumentList $package.args
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "ChocoPackages"
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-Chrome.ps1
|
||||
## Desc: Install Google Chrome
|
||||
## Desc: Install Google Chrome browser and Chrome WebDriver
|
||||
################################################################################
|
||||
|
||||
# Download and install latest Chrome browser
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
$commonPackages = (Get-ToolsetContent).choco.common_packages
|
||||
|
||||
foreach ($package in $commonPackages)
|
||||
{
|
||||
Choco-Install -PackageName $package.name -ArgumentList $package.args
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "ChocoPackages"
|
||||
@@ -1,7 +1,7 @@
|
||||
################################################################################
|
||||
## File: Install-DotnetSDK.ps1
|
||||
## Desc: Install all released versions of the dotnet sdk and populate package
|
||||
## cache. Should run after VS and Node
|
||||
## cache. Should run after VS and Node
|
||||
## Supply chain security: checksum validation
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-Edge.ps1
|
||||
## Desc: Configure Edge browser and install Edge WebDriver
|
||||
## File: Install-EdgeDriver.ps1
|
||||
## Desc: Install Edge WebDriver and configure Microsoft Edge
|
||||
################################################################################
|
||||
|
||||
# Disable Edge auto-updates
|
||||
@@ -9,8 +9,7 @@ Rename-Item -Path "C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpda
|
||||
# Install Microsoft Edge WebDriver
|
||||
Write-Host "Install Edge WebDriver..."
|
||||
$EdgeDriverPath = "$($env:SystemDrive)\SeleniumWebDrivers\EdgeDriver"
|
||||
if (-not (Test-Path -Path $EdgeDriverPath))
|
||||
{
|
||||
if (-not (Test-Path -Path $EdgeDriverPath)) {
|
||||
New-Item -Path $EdgeDriverPath -ItemType Directory -Force
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-Firefox.ps1
|
||||
## Desc: Install Mozilla Firefox
|
||||
## Desc: Install Mozilla Firefox browser and Gecko WebDriver
|
||||
## Supply chain security: Firefox browser - checksum validation
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
################################################################################
|
||||
## File: Install-NativeImages.ps1
|
||||
## Desc: Generate and install native images for .NET assemblies
|
||||
################################################################################
|
||||
|
||||
Write-Host "NGen: Microsoft.PowerShell.Utility.Activities"
|
||||
$null = & $env:SystemRoot\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
Write-Host "NGen: Framework64"
|
||||
$null = & $env:SystemRoot\Microsoft.NET\Framework64\v4.0.30319\ngen.exe update
|
||||
Write-Host "NGen: Framework"
|
||||
$null = & $env:SystemRoot\Microsoft.NET\Framework\v4.0.30319\ngen.exe update
|
||||
$null = & $env:SystemRoot\Microsoft.NET\Framework\v4.0.30319\ngen.exe update
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
## File: Install-NodeLts.ps1
|
||||
## File: Install-NodeJS.ps1
|
||||
## Desc: Install nodejs-lts and other common node tools.
|
||||
## Must run after python is configured
|
||||
################################################################################
|
||||
@@ -1,14 +1,32 @@
|
||||
# Set custom directorys for pipx
|
||||
################################################################################
|
||||
## File: Install-Pipx.ps1
|
||||
## Desc: Install pipx and pipx packages
|
||||
################################################################################
|
||||
|
||||
Write-Host "Installing pipx..."
|
||||
$env:PIPX_BIN_DIR = "${env:ProgramFiles(x86)}\pipx_bin"
|
||||
$env:PIPX_HOME = "${env:ProgramFiles(x86)}\pipx"
|
||||
|
||||
# Install pipx
|
||||
pip install pipx
|
||||
|
||||
# Set environment variables
|
||||
Add-MachinePathItem "${env:PIPX_BIN_DIR}"
|
||||
Set-SystemVariable -SystemVariable PIPX_BIN_DIR -Value $env:PIPX_BIN_DIR
|
||||
Set-SystemVariable -SystemVariable PIPX_HOME -Value $env:PIPX_HOME
|
||||
|
||||
# Test pipx
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||
|
||||
Write-Host "Installing pipx packages..."
|
||||
|
||||
$pipxToolset = (Get-ToolsetContent).pipx
|
||||
foreach ($tool in $pipxToolset) {
|
||||
if ($tool.python) {
|
||||
$pythonPath = (Get-Item -Path "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}.*\x64\python-${tool.python}*").FullName
|
||||
Write-Host "Install ${tool.package} into python ${tool.python}"
|
||||
pipx install $tool.package --python $pythonPath
|
||||
} else {
|
||||
Write-Host "Install ${tool.package} into default python"
|
||||
pipx install $tool.package
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "PipxPackages"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
$pipxToolset = (Get-ToolsetContent).pipx
|
||||
foreach($tool in $pipxToolset) {
|
||||
if ($tool.python) {
|
||||
$pythonPath = (Get-Item -Path "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}.*\x64\python-${tool.python}*").FullName
|
||||
Write-Host "Install ${tool.package} into python ${tool.python}"
|
||||
pipx install $tool.package --python $pythonPath
|
||||
} else {
|
||||
Write-Host "Install ${tool.package} into default python"
|
||||
pipx install $tool.package
|
||||
}
|
||||
}
|
||||
Invoke-PesterTests -TestFile "PipxPackages"
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Install-PowershellModules.ps1
|
||||
## Desc: Install common PowerShell modules
|
||||
################################################################################
|
||||
|
||||
# Set TLS1.2
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
################################################################################
|
||||
## File: Install-AzureModules.ps1
|
||||
## Desc: PowerShell modules used by AzureFileCopy@4, AzureFileCopy@5, AzurePowerShell@4, AzurePowerShell@5 tasks
|
||||
## File: Install-PowershellAzModules.ps1
|
||||
## Desc: Install PowerShell modules used by AzureFileCopy@4, AzureFileCopy@5, AzurePowerShell@4, AzurePowerShell@5 tasks
|
||||
## Supply chain security: package manager
|
||||
################################################################################
|
||||
|
||||
# The correct Modules need to be saved in C:\Modules
|
||||
$installPSModulePath = "C:\\Modules"
|
||||
if (-not (Test-Path -LiteralPath $installPSModulePath))
|
||||
{
|
||||
if (-not (Test-Path -LiteralPath $installPSModulePath)) {
|
||||
Write-Host "Creating ${installPSModulePath} folder to store PowerShell Azure modules..."
|
||||
$null = New-Item -Path $installPSModulePath -ItemType Directory
|
||||
}
|
||||
@@ -17,28 +16,24 @@ $modules = (Get-ToolsetContent).azureModules
|
||||
|
||||
$psModuleMachinePath = ""
|
||||
|
||||
foreach ($module in $modules)
|
||||
{
|
||||
foreach ($module in $modules) {
|
||||
$moduleName = $module.name
|
||||
|
||||
Write-Host "Installing ${moduleName} to the ${installPSModulePath} path..."
|
||||
foreach ($version in $module.versions)
|
||||
{
|
||||
foreach ($version in $module.versions) {
|
||||
$modulePath = Join-Path -Path $installPSModulePath -ChildPath "${moduleName}_${version}"
|
||||
Write-Host " - $version [$modulePath]"
|
||||
Save-Module -Path $modulePath -Name $moduleName -RequiredVersion $version -Force -ErrorAction Stop
|
||||
}
|
||||
|
||||
foreach ($version in $module.zip_versions)
|
||||
{
|
||||
foreach ($version in $module.zip_versions) {
|
||||
$modulePath = Join-Path -Path $installPSModulePath -ChildPath "${moduleName}_${version}"
|
||||
Save-Module -Path $modulePath -Name $moduleName -RequiredVersion $version -Force -ErrorAction Stop
|
||||
Compress-Archive -Path $modulePath -DestinationPath "${modulePath}.zip"
|
||||
Remove-Item $modulePath -Recurse -Force
|
||||
}
|
||||
# Append default tool version to machine path
|
||||
if ($null -ne $module.default)
|
||||
{
|
||||
if ($null -ne $module.default) {
|
||||
$defaultVersion = $module.default
|
||||
|
||||
Write-Host "Use ${moduleName} ${defaultVersion} as default version..."
|
||||
@@ -50,4 +45,4 @@ foreach ($module in $modules)
|
||||
$psModuleMachinePath += $env:PSModulePath
|
||||
[Environment]::SetEnvironmentVariable("PSModulePath", $psModuleMachinePath, "Machine")
|
||||
|
||||
Invoke-PesterTests -TestFile "PowerShellAzModules" -TestName "AzureModules"
|
||||
Invoke-PesterTests -TestFile "PowerShellAzModules" -TestName "AzureModules"
|
||||
@@ -1,9 +1,9 @@
|
||||
################################################################################
|
||||
## File: Install-PyPy.ps1
|
||||
## Team: CI-Build
|
||||
## Desc: Install PyPy
|
||||
## Supply chain security: checksum validation
|
||||
################################################################################
|
||||
|
||||
function Install-PyPy
|
||||
{
|
||||
param(
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
################################################################################
|
||||
## File: Install-Ruby.ps1
|
||||
## Desc: Install rubyinstaller2
|
||||
## Desc: Install Ruby using the RubyInstaller2 package and set the default Ruby version
|
||||
################################################################################
|
||||
|
||||
function Get-RubyVersions
|
||||
{
|
||||
function Get-RubyVersions {
|
||||
param (
|
||||
[System.String] $Arch = "x64",
|
||||
[System.String] $Extension = "7z",
|
||||
@@ -12,24 +11,20 @@ function Get-RubyVersions
|
||||
)
|
||||
|
||||
$uri = "https://api.github.com/repos/oneclick/rubyinstaller2/releases?per_page=$ReleasesAmount"
|
||||
try
|
||||
{
|
||||
try {
|
||||
$versionLists = @{}
|
||||
$assets = (Invoke-RestMethod -Uri $uri).Where{ -not $_.prerelease }.assets
|
||||
$7zArchives = $assets.Where{ $_.name.EndsWith("$Arch.$Extension") }
|
||||
$majorMinorGroups = $7zArchives | Group-Object { $_.name.Replace("rubyinstaller-", "").Substring(0, 3) }
|
||||
foreach($majorMinorGroup in $majorMinorGroups)
|
||||
{
|
||||
foreach ($majorMinorGroup in $majorMinorGroups) {
|
||||
$group = $majorMinorGroup.Group
|
||||
$sortVersions = $group | Sort-Object {[Version]$_.name.Replace("rubyinstaller-", "").Replace("-$Arch.$Extension","").Replace("-",".")}
|
||||
$sortVersions = $group | Sort-Object { [Version]$_.name.Replace("rubyinstaller-", "").Replace("-$Arch.$Extension", "").Replace("-", ".") }
|
||||
$latestVersion = $sortVersions | Select-Object -Last 1
|
||||
$versionLists[$majorMinorGroup.Name] = $latestVersion.browser_download_url
|
||||
|
||||
}
|
||||
return $versionLists
|
||||
}
|
||||
catch
|
||||
{
|
||||
} catch {
|
||||
Write-Host "Unable to send request to the '$uri'. Error: '$_'"
|
||||
exit 1
|
||||
}
|
||||
@@ -37,8 +32,7 @@ function Get-RubyVersions
|
||||
|
||||
# Most of this logic is from
|
||||
# https://github.com/ruby/setup-ruby/blob/master/windows.js
|
||||
function Install-Ruby
|
||||
{
|
||||
function Install-Ruby {
|
||||
param(
|
||||
[String]$PackagePath,
|
||||
[String]$Architecture = "x64"
|
||||
@@ -46,8 +40,7 @@ function Install-Ruby
|
||||
|
||||
# Create Ruby toolcache folder
|
||||
$rubyToolcachePath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Ruby"
|
||||
if (-not (Test-Path $rubyToolcachePath))
|
||||
{
|
||||
if (-not (Test-Path $rubyToolcachePath)) {
|
||||
Write-Host "Creating Ruby toolcache folder"
|
||||
New-Item -ItemType Directory -Path $rubyToolcachePath | Out-Null
|
||||
}
|
||||
@@ -60,8 +53,7 @@ function Install-Ruby
|
||||
# Get Ruby version from binaries
|
||||
$rubyVersion = & "$tempFolder\bin\ruby.exe" -e "print RUBY_VERSION"
|
||||
|
||||
if ($rubyVersion)
|
||||
{
|
||||
if ($rubyVersion) {
|
||||
Write-Host "Installing Ruby $rubyVersion"
|
||||
$rubyVersionPath = Join-Path -Path $rubyToolcachePath -ChildPath $rubyVersion
|
||||
$rubyArchPath = Join-Path -Path $rubyVersionPath -ChildPath $Architecture
|
||||
@@ -79,18 +71,15 @@ function Install-Ruby
|
||||
|
||||
Write-Host "Creating complete file"
|
||||
New-Item -ItemType File -Path $rubyVersionPath -Name "$Architecture.complete" | Out-Null
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Write-Host "Ruby application is not found. Failed to expand '$PackagePath' archive"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
function Set-DefaultRubyVersion
|
||||
{
|
||||
function Set-DefaultRubyVersion {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[Parameter(Mandatory = $true)]
|
||||
[System.Version] $Version,
|
||||
[System.String] $Arch = "x64"
|
||||
)
|
||||
@@ -110,21 +99,17 @@ $rubyToolVersions = $rubyTools.versions
|
||||
$rubyLatestMajorVersions = Get-RubyVersions
|
||||
|
||||
Write-Host "Starting installation Ruby..."
|
||||
foreach($rubyVersion in $rubyToolVersions)
|
||||
{
|
||||
foreach ($rubyVersion in $rubyToolVersions) {
|
||||
Write-Host "Starting Ruby $rubyVersion installation"
|
||||
# Get url for the latest major Ruby version
|
||||
$url = $rubyLatestMajorVersions[$rubyVersion]
|
||||
if ($url)
|
||||
{
|
||||
if ($url) {
|
||||
$tempRubyPackagePath = Start-DownloadWithRetry -Url $url
|
||||
Install-Ruby -PackagePath $tempRubyPackagePath
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Write-Host "Url not found for the '$rubyVersion' version"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Set-DefaultRubyVersion -Version $rubyTools.default -Arch $rubyTools.arch
|
||||
Set-DefaultRubyVersion -Version $rubyTools.default -Arch $rubyTools.arch
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Install-SQLOLEDBDriver.ps1
|
||||
## Desc: Install SQL OLEDB Driver
|
||||
## Desc: Install OLE DB Driver for SQL Server
|
||||
################################################################################
|
||||
|
||||
$binaryDownloadPath = Start-DownloadWithRetry "https://go.microsoft.com/fwlink/?linkid=2242656" "msoledbsql.msi"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
###################################################################################
|
||||
## File: Install-Vsix.ps1
|
||||
## File: Install-VSExtensions.ps1
|
||||
## Desc: Install the Visual Studio Extensions from toolset.json
|
||||
###################################################################################
|
||||
|
||||
@@ -21,4 +21,4 @@ $vsixPackagesList | ForEach-Object {
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "Vsix"
|
||||
Invoke-PesterTests -TestFile "Vsix"
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
## File: Install-VS.ps1
|
||||
## File: Install-VisualStudio.ps1
|
||||
## Desc: Install Visual Studio
|
||||
################################################################################
|
||||
|
||||
@@ -19,8 +19,7 @@ Install-VisualStudio `
|
||||
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
||||
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
|
||||
|
||||
if ($instanceFolders -is [array])
|
||||
{
|
||||
if ($instanceFolders -is [array]) {
|
||||
Write-Host "More than one instance installed"
|
||||
exit 1
|
||||
}
|
||||
@@ -32,14 +31,14 @@ Set-Content -Path "$vsInstallRoot\Common7\IDE\Extensions\MachineState.json" -Val
|
||||
|
||||
if (Test-IsWin19) {
|
||||
|
||||
# Install Windows 10 SDK version 10.0.14393.795
|
||||
# Install Windows 10 SDK version 10.0.14393.795
|
||||
$sdkSignatureThumbprint = "C91545B333C52C4465DE8B90A3FAF4E1D9C58DFA"
|
||||
$sdkUrl = "https://go.microsoft.com/fwlink/p/?LinkId=838916"
|
||||
$sdkFileName = "sdksetup14393.exe"
|
||||
$argumentList = ("/q", "/norestart", "/ceip off", "/features OptionId.WindowsSoftwareDevelopmentKit")
|
||||
Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList -ExpectedSignature $sdkSignatureThumbprint
|
||||
$sdkUrl = "https://go.microsoft.com/fwlink/p/?LinkId=838916"
|
||||
$sdkFileName = "sdksetup14393.exe"
|
||||
$argumentList = ("/q", "/norestart", "/ceip off", "/features OptionId.WindowsSoftwareDevelopmentKit")
|
||||
Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList -ExpectedSignature $sdkSignatureThumbprint
|
||||
|
||||
# Install Windows 11 SDK version 10.0.22621.0
|
||||
# Install Windows 11 SDK version 10.0.22621.0
|
||||
$sdkSignatureThumbprint = "E4C5C5FCDB68B930EE4E19BC25D431EF6D864C51"
|
||||
$sdkUrl = "https://go.microsoft.com/fwlink/p/?linkid=2196241"
|
||||
$sdkFileName = "sdksetup22621.exe"
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
## File: Wait-WindowsUpdatesForInstall.ps1
|
||||
## Desc: Wait for installation windows updates to complete
|
||||
## File: Install-WindowsUpdatesAfterReboot.ps1
|
||||
## Desc: Waits for Windows Updates to finish installing after reboot
|
||||
################################################################################
|
||||
|
||||
Invoke-SBWithRetry -RetryCount 10 -RetryIntervalSeconds 120 -Command {
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
## File: Install-zstd.ps1
|
||||
## File: Install-Zstd.ps1
|
||||
## Desc: Install zstd
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ param()
|
||||
. $PSScriptRoot\PathHelpers.ps1
|
||||
. $PSScriptRoot\InstallHelpers.ps1
|
||||
. $PSScriptRoot\ChocoHelpers.ps1
|
||||
. $PSScriptRoot\TestsHelpers.ps1
|
||||
. $PSScriptRoot\VisualStudioHelpers.ps1
|
||||
|
||||
Export-ModuleMember -Function @(
|
||||
@@ -26,6 +25,7 @@ Export-ModuleMember -Function @(
|
||||
'Install-VisualStudio'
|
||||
'Get-ToolsetContent'
|
||||
'Get-ToolsetToolFullPath'
|
||||
'Get-ToolcacheToolDirectory'
|
||||
'Stop-SvcWithErrHandling'
|
||||
'Set-SvcWithErrHandling'
|
||||
'Start-DownloadWithRetry'
|
||||
@@ -40,10 +40,6 @@ Export-ModuleMember -Function @(
|
||||
'Get-LatestChocoPackageVersion'
|
||||
'Get-GitHubPackageDownloadUrl'
|
||||
'Extract-7Zip'
|
||||
'Get-CommandResult'
|
||||
'Get-WhichTool'
|
||||
'Get-EnvironmentVariable'
|
||||
'Invoke-PesterTests'
|
||||
'Invoke-SBWithRetry'
|
||||
'Get-VsCatalogJsonPath'
|
||||
'Install-AndroidSDKPackages'
|
||||
@@ -54,7 +50,6 @@ Export-ModuleMember -Function @(
|
||||
'Get-VisualStudioComponents'
|
||||
'Get-WindowsUpdatesHistory'
|
||||
'New-ItemPath'
|
||||
'Get-ModuleVersionAsJob'
|
||||
'Use-ChecksumComparison'
|
||||
'Get-HashFromGitHubReleaseBody'
|
||||
'Test-FileSignature'
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
|
||||
function Get-CommandResult {
|
||||
Param (
|
||||
[Parameter(Mandatory)][string] $Command
|
||||
@@ -7,7 +10,7 @@ function Get-CommandResult {
|
||||
$exitCode = $LASTEXITCODE
|
||||
|
||||
return @{
|
||||
Output = $output
|
||||
Output = $output
|
||||
ExitCode = $exitCode
|
||||
}
|
||||
}
|
||||
@@ -87,8 +90,7 @@ function ShouldReturnZeroExitCode {
|
||||
[bool]$succeeded = $result.ExitCode -eq 0
|
||||
if ($Negate) { $succeeded = -not $succeeded }
|
||||
|
||||
if (-not $succeeded)
|
||||
{
|
||||
if (-not $succeeded) {
|
||||
$commandOutputIndent = " " * 4
|
||||
$commandOutput = ($result.Output | ForEach-Object { "${commandOutputIndent}${_}" }) -join "`n"
|
||||
$failureMessage = "Command '${ActualValue}' has finished with exit code ${actualExitCode}`n${commandOutput}"
|
||||
@@ -111,22 +113,19 @@ function ShouldReturnZeroExitCodeWithParam {
|
||||
|
||||
$delimiterCharacter = ""
|
||||
|
||||
while ($delimiterCharacter.Length -le 2)
|
||||
{
|
||||
while ($delimiterCharacter.Length -le 2) {
|
||||
$callParameterWithDelimiter = $delimiterCharacter + $CallParameter
|
||||
$commandToCheck = "$ActualValue $callParameterWithDelimiter"
|
||||
[bool]$succeeded = (ShouldReturnZeroExitCode -ActualValue $commandToCheck).Succeeded
|
||||
|
||||
if ($succeeded)
|
||||
{
|
||||
if ($succeeded) {
|
||||
break
|
||||
}
|
||||
$delimiterCharacter += '-'
|
||||
}
|
||||
if ($Negate) { $succeeded = -not $succeeded }
|
||||
|
||||
if (-not $succeeded)
|
||||
{
|
||||
if (-not $succeeded) {
|
||||
$failureMessage = "Tool '$ActualValue' has not returned 0 exit code for any of these flags: '$CallParameter' or '-$CallParameter' or '--$CallParameter'"
|
||||
}
|
||||
|
||||
@@ -156,8 +155,7 @@ function ShouldMatchCommandOutput {
|
||||
if (-not $succeeded) {
|
||||
if ($Negate) {
|
||||
$failureMessage = "Expected regular expression '$RegularExpression' for '$ActualValue' command to not match '$output', but it did match."
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$failureMessage = "Expected regular expression '$RegularExpression' for '$ActualValue' command to match '$output', but it did not match."
|
||||
}
|
||||
}
|
||||
@@ -198,3 +196,12 @@ Function Get-ModuleVersionAsJob {
|
||||
$testJob | Wait-Job | Receive-Job | Out-File -FilePath "${env:TEMP}\module-version.txt"
|
||||
Remove-Job $testJob
|
||||
}
|
||||
|
||||
|
||||
Export-ModuleMember -Function @(
|
||||
'Get-CommandResult'
|
||||
'Get-WhichTool'
|
||||
'Get-EnvironmentVariable'
|
||||
'Invoke-PesterTests'
|
||||
'Get-ModuleVersionAsJob'
|
||||
)
|
||||
@@ -92,6 +92,8 @@
|
||||
"Remove-Item -Recurse '{{user `image_folder`}}\\assets'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\docs-gen' '{{user `image_folder`}}\\SoftwareReport'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\helpers' '{{user `helper_script_folder`}}\\ImageHelpers'",
|
||||
"New-Item -Type Directory -Path '{{user `helper_script_folder`}}\\TestsHelpers\\'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\tests\\Helpers.psm1' '{{user `helper_script_folder`}}\\TestsHelpers\\TestsHelpers.psm1'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\tests' '{{user `image_folder`}}\\tests'",
|
||||
"Remove-Item -Recurse '{{user `image_folder`}}\\scripts'",
|
||||
"Move-Item '{{user `image_folder`}}\\toolsets\\toolset-2019.json' '{{user `image_folder`}}\\toolset.json'",
|
||||
@@ -147,14 +149,15 @@
|
||||
"IMAGEDATA_FILE={{user `imagedata_file`}}"
|
||||
],
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Configure-Antivirus.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-WindowsDefender.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-PowerShell.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowerShellModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WindowsFeatures.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Choco.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Initialize-VM.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Update-ImageData.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Update-DotnetTLS.ps1"
|
||||
"{{ template_dir }}/../scripts/build/Install-Chocolatey.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-BaseImage.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-ImageDataFile.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-SystemEnvironment.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-DotnetSecureChannel.ps1"
|
||||
],
|
||||
"execution_policy": "unrestricted"
|
||||
},
|
||||
@@ -167,8 +170,8 @@
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-VCRedist.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker-WinCred.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker-Compose.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DockerWinCred.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DockerCompose.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellCore.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WebPlatformInstaller.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Runner.ps1"
|
||||
@@ -185,7 +188,7 @@
|
||||
3010
|
||||
],
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-VS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-VisualStudio.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-KubernetesTools.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-NET48-devpack.ps1"
|
||||
],
|
||||
@@ -197,10 +200,10 @@
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-Wix.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WDK.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Vsix.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-VSExtensions.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureDevOpsCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-CommonUtils.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-ChocolateyPackages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-JavaTools.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Kotlin.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-OpenSSL.ps1"
|
||||
@@ -226,23 +229,22 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-ActionArchiveCache.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-ActionsCache.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Ruby.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PyPy.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Toolset.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-Toolset.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-NodeLts.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-NodeJS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AndroidSDK.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellAzModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Pipx.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PipxPackages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Git.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-GitHub-CLI.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PHP.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Rust.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Sbt.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Chrome.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Edge.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-EdgeDriver.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Firefox.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Selenium.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-IEWebDriver.ps1",
|
||||
@@ -251,7 +253,7 @@
|
||||
"{{ template_dir }}/../scripts/build/Install-Msys2.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WinAppDriver.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-R.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AWS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AWSTools.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DACFx.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-MysqlCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-SQLPowerShellTools.ps1",
|
||||
@@ -275,11 +277,11 @@
|
||||
"{{ template_dir }}/../scripts/build/Install-GoogleCloudCLI.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-CodeQLBundle.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-BizTalkBuildComponent.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Disable-JITDebugger.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-Diagnostics.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-DynamicPort.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-GDIProcessHandleQuota.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-Shell.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Enable-DeveloperMode.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-DeveloperMode.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-LLVM.ps1"
|
||||
]
|
||||
},
|
||||
@@ -301,7 +303,7 @@
|
||||
"type": "powershell",
|
||||
"pause_before": "2m",
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Wait-WindowsUpdatesForInstall.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WindowsUpdatesAfterReboot.ps1",
|
||||
"{{ template_dir }}/../scripts/tests/RunAll-Tests.ps1"
|
||||
]
|
||||
},
|
||||
@@ -314,7 +316,7 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": [
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\Generate-SoftwareReport.ps1'"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}"
|
||||
@@ -343,9 +345,9 @@
|
||||
"type": "powershell",
|
||||
"skip_clean": true,
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Run-NGen.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Finalize-VM.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Warmup-User.ps1"
|
||||
"{{ template_dir }}/../scripts/build/Install-NativeImages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-System.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-User.ps1"
|
||||
],
|
||||
"environment_vars": [
|
||||
"INSTALL_USER={{user `install_user`}}"
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
"Remove-Item -Recurse '{{user `image_folder`}}\\assets'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\docs-gen' '{{user `image_folder`}}\\SoftwareReport'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\helpers' '{{user `helper_script_folder`}}\\ImageHelpers'",
|
||||
"New-Item -Type Directory -Path '{{user `helper_script_folder`}}\\TestsHelpers\\'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\tests\\Helpers.psm1' '{{user `helper_script_folder`}}\\TestsHelpers\\TestsHelpers.psm1'",
|
||||
"Move-Item '{{user `image_folder`}}\\scripts\\tests' '{{user `image_folder`}}\\tests'",
|
||||
"Remove-Item -Recurse '{{user `image_folder`}}\\scripts'",
|
||||
"Move-Item '{{user `image_folder`}}\\toolsets\\toolset-2022.json' '{{user `image_folder`}}\\toolset.json'",
|
||||
@@ -131,14 +133,15 @@
|
||||
"IMAGEDATA_FILE={{user `imagedata_file`}}"
|
||||
],
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Configure-Antivirus.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-WindowsDefender.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-PowerShell.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowerShellModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WindowsFeatures.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Choco.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Initialize-VM.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Update-ImageData.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Update-DotnetTLS.ps1"
|
||||
"{{ template_dir }}/../scripts/build/Install-Chocolatey.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-BaseImage.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-ImageDataFile.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-SystemEnvironment.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-DotnetSecureChannel.ps1"
|
||||
],
|
||||
"execution_policy": "unrestricted"
|
||||
},
|
||||
@@ -152,8 +155,8 @@
|
||||
"type": "powershell",
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker-WinCred.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Docker-Compose.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DockerWinCred.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DockerCompose.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellCore.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WebPlatformInstaller.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Runner.ps1"
|
||||
@@ -170,7 +173,7 @@
|
||||
3010
|
||||
],
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-VS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-VisualStudio.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-KubernetesTools.ps1"
|
||||
],
|
||||
"elevated_user": "{{user `install_user`}}",
|
||||
@@ -187,10 +190,10 @@
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-Wix.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WDK.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Vsix.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-VSExtensions.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureDevOpsCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-CommonUtils.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-ChocolateyPackages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-JavaTools.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Kotlin.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-OpenSSL.ps1"
|
||||
@@ -216,23 +219,22 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Install-ActionArchiveCache.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-ActionsCache.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Ruby.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PyPy.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Toolset.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-Toolset.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-NodeLts.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-NodeJS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AndroidSDK.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AzureModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PowershellAzModules.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Pipx.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PipxPackages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Git.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-GitHub-CLI.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-PHP.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Rust.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Sbt.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Chrome.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Edge.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-EdgeDriver.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Firefox.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-Selenium.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-IEWebDriver.ps1",
|
||||
@@ -241,7 +243,7 @@
|
||||
"{{ template_dir }}/../scripts/build/Install-Msys2.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WinAppDriver.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-R.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AWS.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-AWSTools.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-DACFx.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-MysqlCli.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-SQLPowerShellTools.ps1",
|
||||
@@ -262,7 +264,7 @@
|
||||
"{{ template_dir }}/../scripts/build/Install-RootCA.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-MongoDB.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-CodeQLBundle.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Disable-JITDebugger.ps1"
|
||||
"{{ template_dir }}/../scripts/build/Configure-Diagnostics.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -272,7 +274,7 @@
|
||||
"{{ template_dir }}/../scripts/build/Configure-DynamicPort.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-GDIProcessHandleQuota.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-Shell.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Enable-DeveloperMode.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-DeveloperMode.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-LLVM.ps1"
|
||||
],
|
||||
"elevated_user": "{{user `install_user`}}",
|
||||
@@ -288,7 +290,7 @@
|
||||
"type": "powershell",
|
||||
"pause_before": "2m",
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Wait-WindowsUpdatesForInstall.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Install-WindowsUpdatesAfterReboot.ps1",
|
||||
"{{ template_dir }}/../scripts/tests/RunAll-Tests.ps1"
|
||||
]
|
||||
},
|
||||
@@ -301,7 +303,7 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": [
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\Generate-SoftwareReport.ps1'"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}"
|
||||
@@ -330,9 +332,9 @@
|
||||
"type": "powershell",
|
||||
"skip_clean": true,
|
||||
"scripts": [
|
||||
"{{ template_dir }}/../scripts/build/Run-NGen.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Finalize-VM.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Warmup-User.ps1"
|
||||
"{{ template_dir }}/../scripts/build/Install-NativeImages.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-System.ps1",
|
||||
"{{ template_dir }}/../scripts/build/Configure-User.ps1"
|
||||
],
|
||||
"environment_vars": [
|
||||
"INSTALL_USER={{user `install_user`}}"
|
||||
|
||||
Reference in New Issue
Block a user