Improve choco stability by adding retry logic on Windows images (#721)

Add retry logic for choco install to avoid random failures
This commit is contained in:
Aleksandr Chebotov
2020-04-17 10:53:30 +03:00
committed by GitHub
parent d4435d6a11
commit edce722a68
33 changed files with 57 additions and 59 deletions

View File

@@ -61,9 +61,9 @@ setx JAVA_HOME_11_X64 $latestJava11Install /M
# Install Java tools
# Force chocolatey to ignore dependencies on Ant and Maven or else they will download the Oracle JDK
choco install ant -y -i
choco install maven -y -i --version=3.6.3
choco install gradle -y
Choco-Install -PackageName ant -ArgumentList "-i"
Choco-Install -PackageName maven -ArgumentList "-i", "--version=3.6.3"
Choco-Install -PackageName gradle
# Move maven variables to Machine. They may not be in the environment for this script so we need to read them from the registry.
$userSid = (Get-WmiObject win32_useraccount -Filter "name = '$env:USERNAME' AND domain = '$env:USERDOMAIN'").SID