mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-23 18:08:53 +08:00
Improve Windows helpers functions stability (#723)
* Rework windows InstallHelpers; Add retry logic to install function
This commit is contained in:
@@ -7,18 +7,13 @@ Import-Module -Name ImageHelpers -Force
|
||||
|
||||
#SSDT for Visual Studio 2017
|
||||
#The link down below points to the latest version of SSDT for Visual Studio 2017
|
||||
$InstallerURI = 'https://go.microsoft.com/fwlink/?linkid=2124518'
|
||||
$InstallerName = 'SSDT-Setup-ENU.exe'
|
||||
$InstallerName = "SSDT-Setup-ENU.exe"
|
||||
$InstallerUrl = "https://go.microsoft.com/fwlink/?linkid=2124518"
|
||||
$logFilePath = "$env:TEMP\ssdtlog.txt"
|
||||
$ArgumentList = ('/install', 'INSTALLALL', '/passive', '/norestart', "/log `"$logFilePath`"")
|
||||
$ArgumentList = ("/install", "INSTALLALL", "/passive", "/norestart", "/log `"$logFilePath`"")
|
||||
|
||||
$exitCode = Install-EXE -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentList
|
||||
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
||||
|
||||
if($exitCode -ne 0 -and $exitCode -ne 3010)
|
||||
{
|
||||
Write-Host "******** SSDT SETUP LOG START ********"
|
||||
Write-Host $(Get-Content $logFilePath | Out-String)
|
||||
Write-Host "******** SSDT SETUP LOG END ********"
|
||||
}
|
||||
|
||||
exit $exitCode
|
||||
Write-Host "******** SSDT SETUP LOG START ********"
|
||||
Write-Host $(Get-Content $logFilePath | Out-String)
|
||||
Write-Host "******** SSDT SETUP LOG END ********"
|
||||
@@ -5,10 +5,8 @@
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
$InstallerURI = 'http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/sdksetup.exe'
|
||||
$InstallerName = 'sdksetup.exe'
|
||||
$ArgumentList = ('/quiet', '/norestart')
|
||||
$InstallerName = "sdksetup.exe"
|
||||
$InstallerUrl = "http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/${InstallerName}"
|
||||
$ArgumentList = ("/quiet", "/norestart")
|
||||
|
||||
$exitCode = Install-EXE -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentList
|
||||
|
||||
exit $exitCode
|
||||
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
|
||||
|
||||
Reference in New Issue
Block a user