mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 01:03:18 +08:00
[Windows] Move choco installation list into toolset (#3688)
* Move choco installation list into toolset * Add a condition to Install-CommonUtils.ps1 * Rename tests and revert Bazel to single script * Return Install-Bazel.ps1 to windows2016.json and windows2019.json * Remove condition and Write-Host command from Install-CommonUtils.ps1 * Reset Install-Bazel.ps1 to be the same as in main * Update choco.common_packages in toolset-2016.json and toolset-2019.json Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-7zip.ps1
|
||||
## Desc: Install 7zip
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName 7zip.install
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "7-Zip"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-AzCopy.ps1
|
||||
## Desc: Install AzCopy10
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName azcopy10
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "AzCopy"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Bicep.ps1
|
||||
## Desc: Install Bicep
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName Bicep
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Bicep"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Cmake.ps1
|
||||
## Desc: Install Cmake
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName cmake.install -ArgumentList "--installargs",'ADD_CMAKE_TO_PATH=""System""'
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "CMake"
|
||||
8
images/win/scripts/Installers/Install-CommonUtils.ps1
Normal file
8
images/win/scripts/Installers/Install-CommonUtils.ps1
Normal file
@@ -0,0 +1,8 @@
|
||||
$commonPackages = (Get-ToolsetContent).choco.common_packages
|
||||
|
||||
foreach ($package in $commonPackages)
|
||||
{
|
||||
Choco-Install -PackageName $package.name -ArgumentList $package.args
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "ChocoPackages"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-GitVersion.ps1
|
||||
## Desc: Install GitVersion
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName gitversion.portable
|
||||
|
||||
Invoke-PesterTests -TestFile "Git" -TestName "GitVersion"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-InnoSetup.ps1
|
||||
## Desc: Install Inno Setup
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName innosetup
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "InnoSetup"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Jq.ps1
|
||||
## Desc: Install jq
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName jq
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Jq"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Julia.ps1
|
||||
## Desc: Install Julia
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName julia -ArgumentList "--ia","/DIR=C:\Julia"
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Julia"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Nuget.ps1
|
||||
## Desc: Install NuGet.CommandLine
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName NuGet.CommandLine
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Nuget"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-OpenSSL.ps1
|
||||
## Desc: Install OpenSSL
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName openssl.light
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "OpenSSL"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Packer.ps1
|
||||
## Desc: Install Packer
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName packer
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Packer"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Perl.ps1
|
||||
## Desc: Install Perl
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName strawberryperl
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Perl"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Pulumi.ps1
|
||||
## Desc: Install Pulumi
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName pulumi
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pulumi"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Svn.ps1
|
||||
## Desc: Install Subversion
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName tortoisesvn
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Svn"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Swig.ps1
|
||||
## Desc: Install Swig
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName swig
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Swig"
|
||||
@@ -1,8 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-VSWhere.ps1
|
||||
## Desc: Install latest stable version of VSWhere
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName vswhere
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "VSWhere"
|
||||
99
images/win/scripts/Tests/ChocoPackages.Tests.ps1
Normal file
99
images/win/scripts/Tests/ChocoPackages.Tests.ps1
Normal file
@@ -0,0 +1,99 @@
|
||||
Describe "7-Zip" {
|
||||
It "7z" {
|
||||
"7z" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "AzCopy" {
|
||||
It "AzCopy" {
|
||||
"azcopy --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Bicep" {
|
||||
It "Bicep" {
|
||||
"bicep --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GitVersion" {
|
||||
It "gitversion is installed" {
|
||||
"gitversion /version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "InnoSetup" {
|
||||
It "InnoSetup" {
|
||||
(Get-Command -Name iscc).CommandType | Should -BeExactly "Application"
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Jq" {
|
||||
It "Jq" {
|
||||
"jq -n ." | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Nuget" {
|
||||
It "Nuget" {
|
||||
"nuget" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "OpenSSL" {
|
||||
It "OpenSSL" {
|
||||
"openssl version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Packer" {
|
||||
It "Packer" {
|
||||
"packer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Perl" {
|
||||
It "Perl" {
|
||||
"perl --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Pulumi" {
|
||||
It "pulumi" {
|
||||
"pulumi version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Svn" {
|
||||
It "svn" {
|
||||
"svn --version --quiet" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Swig" {
|
||||
It "Swig" {
|
||||
"swig -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "VSWhere" {
|
||||
It "vswhere" {
|
||||
"vswhere" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Julia" {
|
||||
It "Julia path exists" {
|
||||
"C:\Julia" | Should -Exist
|
||||
}
|
||||
|
||||
It "Julia" {
|
||||
"julia --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "CMake" {
|
||||
It "cmake" {
|
||||
"cmake --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
@@ -23,9 +23,3 @@ Describe "Git" {
|
||||
$env:GCM_INTERACTIVE | Should -BeExactly Never
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GitVersion" {
|
||||
It "gitversion is installed" {
|
||||
"gitversion /version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,5 @@
|
||||
Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1") -DisableNameChecking
|
||||
|
||||
Describe "7-Zip" {
|
||||
It "7z" {
|
||||
"7z" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "AzCopy" {
|
||||
It "AzCopy" {
|
||||
"azcopy --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Azure Cosmos DB Emulator" {
|
||||
$cosmosDbEmulatorRegKey = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Get-ItemProperty | Where-Object { $_.DisplayName -eq 'Azure Cosmos DB Emulator' }
|
||||
$installDir = $cosmosDbEmulatorRegKey.InstallLocation
|
||||
@@ -35,18 +23,6 @@ Describe "Bazel" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Bicep" {
|
||||
It "Bicep" {
|
||||
"bicep --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "CMake" {
|
||||
It "cmake" {
|
||||
"cmake --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "CodeQLBundle" {
|
||||
It "CodeQLBundle" {
|
||||
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
|
||||
@@ -78,22 +54,6 @@ Describe "DotnetTLS" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Jq" {
|
||||
It "Jq" {
|
||||
"jq -n ." | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Julia" {
|
||||
It "Julia path exists" {
|
||||
"C:\Julia" | Should -Exist
|
||||
}
|
||||
|
||||
It "Julia" {
|
||||
"julia --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Mercurial" {
|
||||
It "Mercurial" {
|
||||
"hg --version" | Should -ReturnZeroExitCode
|
||||
@@ -128,12 +88,6 @@ Describe "Mingw64" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "InnoSetup" {
|
||||
It "InnoSetup" {
|
||||
(Get-Command -Name iscc).CommandType | Should -BeExactly "Application"
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GoogleCloudSDK" {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "bq" }
|
||||
@@ -157,30 +111,6 @@ Describe "NSIS" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Nuget" {
|
||||
It "Nuget" {
|
||||
"nuget" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "OpenSSL" {
|
||||
It "OpenSSL" {
|
||||
"openssl version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Packer" {
|
||||
It "Packer" {
|
||||
"packer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Perl" {
|
||||
It "Perl" {
|
||||
"perl --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "PowerShell Core" {
|
||||
It "pwsh" {
|
||||
"pwsh --version" | Should -ReturnZeroExitCode
|
||||
@@ -191,12 +121,6 @@ Describe "PowerShell Core" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Pulumi" {
|
||||
It "pulumi" {
|
||||
"pulumi version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Sbt" {
|
||||
It "sbt" {
|
||||
"sbt --version" | Should -ReturnZeroExitCode
|
||||
@@ -209,12 +133,6 @@ Describe "ServiceFabricSDK" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Svn" {
|
||||
It "svn" {
|
||||
"svn --version --quiet" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Stack" {
|
||||
It "Stack" {
|
||||
"stack --version" | Should -ReturnZeroExitCode
|
||||
@@ -241,12 +159,6 @@ Describe "Vcpkg" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "VSWhere" {
|
||||
It "vswhere" {
|
||||
"vswhere" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "WebPlatformInstaller" {
|
||||
It "WebPlatformInstaller" {
|
||||
"WebPICMD" | Should -ReturnZeroExitCode
|
||||
@@ -264,9 +176,3 @@ Describe "Pipx" {
|
||||
"pipx --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Swig" {
|
||||
It "Swig" {
|
||||
"swig -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user