From 6176c3b1bc402164b7182036cf81a665adb70c50 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 17 Mar 2021 20:37:11 +0000 Subject: [PATCH] [CI] Add resilience when installing required tooling (#24542) (#24582) --- .ci/scripts/install-tools.bat | 3 +++ Jenkinsfile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index 1d29b548318..6f2acccb84c 100755 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -20,6 +20,7 @@ IF EXIST "%PROGRAMFILES(X86)%" ( curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/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 ( @@ -27,6 +28,7 @@ IF EXIST "%PROGRAMFILES(X86)%" ( curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/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 ) ) @@ -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 ) diff --git a/Jenkinsfile b/Jenkinsfile index 302b5d5eca9..49398c4191e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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") } } }