mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 03:57:32 +00:00
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:
committed by
GitHub
parent
d4435d6a11
commit
edce722a68
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user