From bc0ab8ea0f2035ac143a5285f09839882e866705 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 21 Jul 2021 15:17:42 -0700 Subject: buildkite: update Go #6322 tried to update Go to 1.16, but existing nodes fail to upgrade due to the presence of old Go [1]. Specifically when trying to add Go to `/usr/bin`: ``` ln: failed to create symbolic link '/usr/bin/go': File exists ``` Also: - Removing `golang-go` also removes apt installs of `gcc` and `pkg-config`, so those are installed explicitly. - Add `-c` to wget, which will prevent re-downloading Go for each run. - Disable GO111MODULE when building cri-tools and containerd, since we're using pre-module versions of each. 1 - https://buildkite.com/gvisor/pipeline/builds/7285#3593244c-e411-472d-804a-9c7fbbd24762 PiperOrigin-RevId: 386106881 --- .buildkite/hooks/pre-command | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.buildkite/hooks') diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index fb2b1892d..6f197436c 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -8,9 +8,17 @@ function install_pkgs() { done } install_pkgs make "linux-headers-$(uname -r)" linux-libc-dev \ - graphviz jq curl binutils gnupg gnupg-agent golang-go \ + graphviz jq curl binutils gnupg gnupg-agent gcc pkg-config \ apt-transport-https ca-certificates software-properties-common +# Install Go 1.16, as only 1.13 is available via apt. If it's installed via apt, +# remove it. +sudo apt-get autoremove -y golang-go +declare -r go_archive=go1.16.6.linux-amd64.tar.gz +wget -c "https://golang.org/dl/${go_archive}" +sudo tar -xzf "${go_archive}" -C /usr/local +sudo ln -s /usr/local/go/bin/go /usr/bin/go + # Setup for parallelization with PARTITION and TOTAL_PARTITIONS. export PARTITION=${BUILDKITE_PARALLEL_JOB:-0} PARTITION=$((${PARTITION}+1)) # 1-indexed, but PARALLEL_JOB is 0-indexed. -- cgit v1.2.3