diff --git a/.ci/scripts/install-go.sh b/.ci/scripts/install-go.sh index 6805ac0a6247..bb9fa43c1f98 100755 --- a/.ci/scripts/install-go.sh +++ b/.ci/scripts/install-go.sh @@ -24,9 +24,9 @@ fi echo "UNMET DEP: Installing Go" mkdir -p "${HOME}/bin" -curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-${ARCH}-amd64" +curl -sSLo "${GVM_CMD}" "https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-${ARCH}-amd64" chmod +x "${GVM_CMD}" -gvm ${GO_VERSION}|cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE} +${GVM_CMD} "${GO_VERSION}" |cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE} -eval $(gvm ${GO_VERSION}) +eval "$("${GVM_CMD}" "${GO_VERSION}")" diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index 0066b25be293..2d4a4dbbbd48 100644 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -7,10 +7,34 @@ IF ERRORLEVEL 1 ( choco install curl -y --no-progress --skipdownloadcache ) mkdir %WORKSPACE%\bin -where /q gvm -IF ERRORLEVEL 1 ( - curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-windows-amd64.exe +IF EXIST "%PROGRAMFILES(X86)%" ( + REM Force the gvm installation. + SET GVM_BIN=gvm.exe + curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe + IF ERRORLEVEL 1 ( + REM gvm installation has failed. + exit /b 1 + ) +) ELSE ( + REM Windows 7 workers got a broken gvm installation. + curl -L -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-386.exe + IF ERRORLEVEL 1 ( + REM gvm installation has failed. + exit /b 1 + ) ) + +SET GVM_BIN=gvm.exe +WHERE /q %GVM_BIN% +%GVM_BIN% version + +REM Install the given go version +%GVM_BIN% --debug install %GO_VERSION% + +REM Configure the given go version +FOR /f "tokens=*" %%i IN ('"%GVM_BIN%" use %GO_VERSION% --format=batch') DO %%i + +go env FOR /f "tokens=*" %%i IN ('"gvm.exe" use %GO_VERSION% --format=batch') DO %%i go install github.com/elastic/beats/vendor/github.com/magefile/mage diff --git a/Vagrantfile b/Vagrantfile index a851be38692f..82bb8cc155bb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -73,7 +73,7 @@ def linuxGvmProvision(arch="amd64") return <