Files
runner-images-sangeeth/images/windows/scripts/build/Install-VSExtensions.ps1
Vasilii Polikarpov d3e630f774 [Windows] Implement installation helpers refactoring (#8865)
* [Windows] Refactor base Installer helper functions

* Fix helper name

* Fix name gen logic and improve error handling

* Fix hash checking logic

* Fix Install-VsixExtension invocation

* Fix variable name in Install-OpenSSL.ps1

* Fix type for git downloadUrl
2023-11-22 15:14:08 +01:00

26 lines
987 B
PowerShell

###################################################################################
## File: Install-VSExtensions.ps1
## Desc: Install the Visual Studio Extensions from toolset.json
###################################################################################
$toolset = Get-ToolsetContent
$vsixPackagesList = $toolset.visualStudio.vsix
if (-not $vsixPackagesList) {
Write-Host "No extensions to install"
exit 0
}
$vsixPackagesList | ForEach-Object {
# Retrieve cdn endpoint to avoid HTTP error 429 https://github.com/actions/runner-images/issues/3074
$vsixPackage = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_
if ($vsixPackage.FileName.EndsWith(".vsix")) {
Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName
} else {
Install-Binary `
-Url $vsixPackage.DownloadUri `
-InstallArgs @('/install', '/quiet', '/norestart')
}
}
Invoke-PesterTests -TestFile "Vsix"