Skip to content

Commit

Permalink
[CI] Add resilience when installing required tooling (elastic#24542)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Mar 17, 2021
1 parent fc8fce4 commit 1a81ef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .ci/scripts/install-tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ IF EXIST "%PROGRAMFILES(X86)%" (
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.2.4/gvm-windows-amd64.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
exit /b 1
)
) ELSE (
REM Windows 7 workers got a broken gvm installation.
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.2.4/gvm-windows-386.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
del bin\gvm.exe /s /f /q
exit /b 1
)
)
Expand All @@ -44,6 +46,7 @@ FOR /f "tokens=*" %%i IN ('"%GVM_BIN%" use %GO_VERSION% --format=batch') DO %%i
go env
IF ERRORLEVEL 1 (
REM go is not configured correctly.
rmdir %WORKSPACE%\.gvm /s /q
exit /b 1
)

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def installTools(args) {
git config --global user.name "beatsmachine"
fi''')
} else {
retryWithSleep(retries: 2, seconds: 5, backoff: true){ bat(label: "${stepHeader} - Install Go/Mage/Python ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") }
retryWithSleep(retries: 3, seconds: 5, backoff: true){ bat(label: "${stepHeader} - Install Go/Mage/Python ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") }
}
}

Expand Down

0 comments on commit 1a81ef9

Please sign in to comment.