BuildKite pre-command: Improve log signal-to-noise ratio.

This removes noise from the package installation process (boring and
noisy), and adds logging for the shell commands that run after that
(which are more interesting).

PiperOrigin-RevId: 454273369
This commit is contained in:
Etienne Perot
2022-06-10 17:31:23 -07:00
committed by gVisor bot
parent b7c0ac33c9
commit 382499139e
+3 -1
View File
@@ -7,7 +7,7 @@ buildkite-agent artifact download 'tools/bazeldefs/*' . || true
function install_pkgs() {
export DEBIAN_FRONTEND=noninteractive
while true; do
if sudo -E apt-get update && sudo -E apt-get install -y "$@"; then
if sudo -E apt-get update -q && sudo -E apt-get install -qy "$@"; then
break
fi
done
@@ -23,6 +23,8 @@ elif test -n "$(apt-cache search --names-only "^linux-gcp-headers-$(uname -r | c
install_pkgs "linux-gcp-headers-$(uname -r | cut -d- -f1-2)"
fi
set -x
# 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.