[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
This commit is contained in:
Vasilii Polikarpov
2023-11-22 15:14:08 +01:00
committed by GitHub
parent 46f21c4413
commit d3e630f774
46 changed files with 361 additions and 462 deletions

View File

@@ -8,18 +8,19 @@
New-Item -Path 'C:\Windows\Installer' -ItemType Directory -Force
# Get Service Fabric components versions
$serviceFabricRuntimeVersion = (Get-ToolsetContent).serviceFabric.runtime.version
$serviceFabricSDKVersion = (Get-ToolsetContent).serviceFabric.sdk.version
$runtimeVersion = (Get-ToolsetContent).serviceFabric.runtime.version
$sdkVersion = (Get-ToolsetContent).serviceFabric.sdk.version
$urlBase = "https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856"
# Install Service Fabric Runtime for Windows
$InstallerName = "MicrosoftServiceFabric.${serviceFabricRuntimeVersion}.exe"
$InstallerUrl = "https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856/${InstallerName}"
$ArgumentList = ("/accepteula ","/quiet","/force")
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList -ExpectedSignature (Get-ToolsetContent).serviceFabric.runtime.signature
Install-Binary `
-Url "${urlBase}/MicrosoftServiceFabric.${runtimeVersion}.exe" `
-InstallArgs @("/accepteula ", "/quiet", "/force") `
-ExpectedSignature (Get-ToolsetContent).serviceFabric.runtime.signature
# Install Service Fabric SDK
$InstallerName = "MicrosoftServiceFabricSDK.${serviceFabricSDKVersion}.msi"
$InstallerUrl = "https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856/${InstallerName}"
Install-Binary -Url $InstallerUrl -Name $InstallerName -ExpectedSignature (Get-ToolsetContent).serviceFabric.sdk.signature
Install-Binary `
-Url "${urlBase}/MicrosoftServiceFabricSDK.${sdkVersion}.msi" `
-ExpectedSignature (Get-ToolsetContent).serviceFabric.sdk.signature
Invoke-PesterTests -TestFile "Tools" -TestName "ServiceFabricSDK"