Skip to content

Commit c2bccd0

Browse files
authored
xds/kokoro: install go 1.17, and retry go build (#5015)
1 parent 872a6f1 commit c2bccd0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/kokoro/xds.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ shopt -s extglob
1313
branch="${branch//[[:space:]]}"
1414
branch="${branch##remotes/origin/}"
1515
shopt -u extglob
16-
go build
16+
# Install a version of Go supported by gRPC for the new features, e.g.
17+
# errors.Is()
18+
curl --retry 3 -O -L https://go.dev/dl/go1.17.3.linux-amd64.tar.gz
19+
sudo tar -C /usr/local -xf go1.17.3.linux-amd64.tar.gz
20+
sudo ln -s /usr/local/go/bin/go /usr/bin/go
21+
# Retry go build on errors (e.g. go get connection errors), for at most 3 times
22+
for i in 1 2 3; do go build && break || sleep 5; done
1723
popd
1824

1925
git clone -b "${branch}" --single-branch --depth=1 https://github.com/grpc/grpc.git

0 commit comments

Comments
 (0)