mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
Add WSL (#1081)
* Add WSL * Move WSL to the end of the provision * Add elevated_user * No restart VM * Add Validation * Add WSL note in Readme.md * Rename WSL1 to WSL Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
This commit is contained in:
@@ -109,6 +109,14 @@
|
|||||||
],
|
],
|
||||||
"execution_policy": "unrestricted"
|
"execution_policy": "unrestricted"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"elevated_user": "SYSTEM",
|
||||||
|
"elevated_password": "",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Windows2019/Install-WSL.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
@@ -243,6 +251,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-Wix.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Wix.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Validate-WSL.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
14
images/win/scripts/Installers/Validate-WSL.ps1
Normal file
14
images/win/scripts/Installers/Validate-WSL.ps1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Validate-WSL.ps1
|
||||||
|
## Desc: Validate WSL CLI existst
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if (Get-Command -Name 'wsl')
|
||||||
|
{
|
||||||
|
Write-Host 'wsl is on path'
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host 'wsl not on path'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-WSL.ps1
|
||||||
|
## Desc: Install Windows Subsystem for Linux
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
Write-Host "Install Windows Subsystem for Linux"
|
||||||
|
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
|
||||||
@@ -22,6 +22,11 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
"Image Version: $env:ImageVersion"
|
"Image Version: $env:ImageVersion"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$markdown += New-MDHeader "Enabled windows optional features" -Level 2
|
||||||
|
$markdown += New-MDList -Style Unordered -Lines @(
|
||||||
|
"Windows Subsystem for Linux"
|
||||||
|
)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Installed Software" -Level 2
|
$markdown += New-MDHeader "Installed Software" -Level 2
|
||||||
$markdown += New-MDHeader "Language and Runtime" -Level 3
|
$markdown += New-MDHeader "Language and Runtime" -Level 3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user