buildkite: move golang installation to VM boot

Rather than re-downloading and installing Go for each pipeline run, we should
just do it at boot.

PiperOrigin-RevId: 386320005
This commit is contained in:
Kevin Krakauer
2021-07-22 14:17:52 -07:00
committed by gVisor bot
parent d5fb4623ea
commit 70626b3da2
-8
View File
@@ -11,14 +11,6 @@ install_pkgs make "linux-headers-$(uname -r)" linux-libc-dev \
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.