From 8b8e110ab66d2abc564fa7cc1e004e188cf3c23e Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 15 Mar 2021 14:53:06 +0000 Subject: [PATCH 1/2] [CI] Add resilience when installing required tooling --- .ci/scripts/install-tools.bat | 8 ++++++++ Jenkinsfile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index 6892e38e5fe..5feac3c81ce 100644 --- 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 ) ) @@ -34,6 +36,11 @@ IF EXIST "%PROGRAMFILES(X86)%" ( SET GVM_BIN=gvm.exe WHERE /q %GVM_BIN% %GVM_BIN% version +IF ERRORLEVEL 1 ( + REM gvm is not configured correctly. + rmdir %WORKSPACE%\.gvm /s /q + exit /b 1 +) REM Install the given go version %GVM_BIN% --debug install %GO_VERSION% @@ -44,6 +51,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 983c7e48ce4..ee59ee71b81 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") } } } From 1bc62467c3a554c227eb86b938f294b29cf9dde5 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 15 Mar 2021 17:01:52 +0000 Subject: [PATCH 2/2] gvm: error: Malformed version: version is allowed somehow --- .ci/scripts/install-tools.bat | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index 5feac3c81ce..b5f54e7fd0f 100644 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -36,11 +36,6 @@ IF EXIST "%PROGRAMFILES(X86)%" ( SET GVM_BIN=gvm.exe WHERE /q %GVM_BIN% %GVM_BIN% version -IF ERRORLEVEL 1 ( - REM gvm is not configured correctly. - rmdir %WORKSPACE%\.gvm /s /q - exit /b 1 -) REM Install the given go version %GVM_BIN% --debug install %GO_VERSION%