Improve Windows helpers functions stability (#723)

* Rework windows InstallHelpers; Add retry logic to install function
This commit is contained in:
Maksim Petrov
2020-04-21 11:58:27 +03:00
committed by GitHub
parent 54a14f61b3
commit 8e8fbb4f76
15 changed files with 197 additions and 227 deletions

View File

@@ -5,12 +5,14 @@
Import-Module -Name ImageHelpers -Force
$CondaDestination = "C:\Miniconda"
# Lock to Miniconda 4.6 until we do the work to run `conda init` for the vsts user
# Then we can go back to installing the latest Miniconda
# $url = "https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe"
$url = "https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Windows-x86_64.exe"
$name = $Url.Split('/')[-1]
$destination = "C:\Miniconda"
$InstallerName = "Miniconda3-4.6.14-Windows-x86_64.exe"
$InstallerUrl = "https://repo.continuum.io/miniconda/${InstallerName}"
$ArgumentList = ("/S", "/AddToPath=0", "/RegisterPython=0", "/D=$CondaDestination")
Install-EXE -Url $url -Name $name -ArgumentList "/S /AddToPath=0 /RegisterPython=0 /D=$destination"
Set-SystemVariable -SystemVariable "CONDA" -Value $destination
Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
Set-SystemVariable -SystemVariable "CONDA" -Value $CondaDestination