From 382499139ef4de6d24bb1058d4fa3c8451fb8293 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Fri, 10 Jun 2022 17:27:56 -0700 Subject: [PATCH] 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 --- .buildkite/hooks/pre-command | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 5107f4bcf..53225aeaf 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -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.