From 70c633ea6be17e643c64761a33295525053deeb1 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Tue, 13 Dec 2022 21:06:15 +0000 Subject: [PATCH] build: update go installation method --- profiler/kokoro/integration_test.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/profiler/kokoro/integration_test.sh b/profiler/kokoro/integration_test.sh index 8d532de09160..d68a5258cb23 100755 --- a/profiler/kokoro/integration_test.sh +++ b/profiler/kokoro/integration_test.sh @@ -35,20 +35,9 @@ export GCLOUD_TESTS_GOLANG_PROJECT_ID="cloud-profiler-e2e" # Ensure a newer version of Go is used so it is compatible with newer libraries. # Here we install v1.18.4 which is the current version as of July 2022. -mkdir -p /tmp/bin -GIMME=/tmp/bin/gimme -retry curl -sL -o "$GIMME" https://raw.githubusercontent.com/travis-ci/gimme/master/gimme -chmod +x "$GIMME" - -export GIMME_GO_VERSION=1.18.4 -export GIMME_ENV_PREFIX=/tmp/gimme_envs -install_go() { - "$GIMME" - # If gimme fails, this file will not exists, source will fail, and install_go - # will be retried. - source "${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.env" -} -retry install_go +retry curl -LO https://go.dev/dl/go1.18.4.linux-amd64.tar.gz +sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin # Run test. go version