Improve Windows provisioners stability (#733)

* Improve Install-CloudFoundryCli.ps1

* Improve Install-Go.ps1

* Improve Install-Kind.ps1

* Improve Install-MysqlCli.ps1

* Improve Install-Rust.ps1

* Improve Install-SQLPowerShellTools.ps1

* Improve Update-AndroidSDK.ps1

* Fix issue with resolve
This commit is contained in:
Maksim Petrov
2020-05-05 20:49:34 +03:00
committed by GitHub
parent c7bd58523e
commit 33f6bf1309
7 changed files with 49 additions and 87 deletions

View File

@@ -6,25 +6,24 @@
$stableKindTag = "v0.7.0"
$tagToUse = $stableKindTag;
$destFilePath = "C:\ProgramData\kind"
$outFilePath = "C:\ProgramData\kind\kind.exe"
try
{
$getkindUri = "https://github.com/kubernetes-sigs/kind/releases/download/$tagToUse/kind-windows-amd64"
$kindUrl = "https://github.com/kubernetes-sigs/kind/releases/download/$tagToUse/kind-windows-amd64"
Write-Host "Downloading kind.exe..."
New-Item -Path $destFilePath -ItemType Directory -Force
Invoke-WebRequest -Uri $getkindUri -OutFile $outFilePath
$kindInstallerPath = Start-DownloadWithRetry -Url $kindUrl -Name "kind.exe" -DownloadPath $destFilePath
Write-Host "Starting Install kind.exe..."
$process = Start-Process -FilePath $outFilePath -Wait -PassThru
$process = Start-Process -FilePath $kindInstallerPath -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
Add-MachinePathItem $destFilePath
exit $exitCode
}
else
{