mirror of
https://github.com/actions/runner-images.git
synced 2026-01-07 02:28:54 +08:00
Merge pull request #1708 from dibir-magomedsaygitov/v-dimago/copy-windows-public-scripts-content
[Windows] Add Windows related scripts from MMS-Provisioner
This commit is contained in:
@@ -82,6 +82,11 @@
|
|||||||
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
||||||
"destination": "{{user `image_folder`}}"
|
"destination": "{{user `image_folder`}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"source": "{{ template_dir }}/post-generation",
|
||||||
|
"destination": "C:/post-generation"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": "{{ template_dir }}/scripts/Tests",
|
"source": "{{ template_dir }}/scripts/Tests",
|
||||||
|
|||||||
@@ -82,6 +82,11 @@
|
|||||||
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
||||||
"destination": "{{user `image_folder`}}"
|
"destination": "{{user `image_folder`}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"source": "{{ template_dir }}/post-generation",
|
||||||
|
"destination": "C:/post-generation"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": "{{ template_dir }}/scripts/Tests",
|
"source": "{{ template_dir }}/scripts/Tests",
|
||||||
|
|||||||
8
images/win/post-generation/Dotnet.ps1
Normal file
8
images/win/post-generation/Dotnet.ps1
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
||||||
|
$dotnetPath = "$env:USERPROFILE\.dotnet\tools"
|
||||||
|
|
||||||
|
if (-not $latestPath.Contains($dotnetPath))
|
||||||
|
{
|
||||||
|
$latestPath = "$dotnetPath;$latestPath"
|
||||||
|
[System.Environment]::SetEnvironmentVariable('PATH', $latestPath, [System.EnvironmentVariableTarget]::Machine)
|
||||||
|
}
|
||||||
12
images/win/post-generation/RustJunction.ps1
Normal file
12
images/win/post-generation/RustJunction.ps1
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Create Rust junction points to cargo and rustup folder
|
||||||
|
$cargoTarget = "$env:USERPROFILE\.cargo"
|
||||||
|
if (-not (Test-Path $cargoTarget))
|
||||||
|
{
|
||||||
|
New-Item -ItemType Junction -Path $cargoTarget -Target "C:\Rust\.cargo"
|
||||||
|
}
|
||||||
|
|
||||||
|
$rustupTarget = "$env:USERPROFILE\.rustup"
|
||||||
|
if (-not (Test-Path $rustupTarget))
|
||||||
|
{
|
||||||
|
New-Item -ItemType Junction -Path $rustupTarget -Target "C:\Rust\.rustup"
|
||||||
|
}
|
||||||
4
images/win/post-generation/VSConfiguration.ps1
Normal file
4
images/win/post-generation/VSConfiguration.ps1
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
$vsInstallRoot = Get-VisualStudioPath
|
||||||
|
$devEnvPath = "$vsInstallRoot\Common7\IDE\devenv.exe"
|
||||||
|
|
||||||
|
cmd.exe /c "`"$devEnvPath`" /updateconfiguration"
|
||||||
@@ -40,5 +40,10 @@ Choco-Install -PackageName hub
|
|||||||
|
|
||||||
Add-MachinePathItem "C:\Program Files\Git\bin"
|
Add-MachinePathItem "C:\Program Files\Git\bin"
|
||||||
|
|
||||||
|
# Add well-known SSH host keys to ssh_known_hosts
|
||||||
|
|
||||||
|
ssh-keyscan -t rsa github.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
||||||
|
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Git" -TestName "Git"
|
Invoke-PesterTests -TestFile "Git" -TestName "Git"
|
||||||
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI"
|
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI"
|
||||||
|
|||||||
Reference in New Issue
Block a user