diff options
author | Adin Scannell <ascannell@google.com> | 2020-12-30 15:06:47 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-30 15:09:12 -0800 |
commit | 899b9ba46a69094975b4f25c24a3c467c0c21276 (patch) | |
tree | 2d3e41fa6ce9bdbfa83d25f4a91f43d18fec7091 /.buildkite/hooks/pre-command | |
parent | 0fb5de1154411bd207dadae31c37054db9941061 (diff) |
Add BuildKite annotations for failures and profiles.
This change cleans up some minor Makefile issues, and adds support for
BuildKite annotations on failure and on profiles being generated. These
annotations will make failures very clear and link to the artifacts.
This change is a stepping stone for aggregating coverage data from all
individual test jobs, as this will also happen in .buildkite/annotate.sh.
PiperOrigin-RevId: 349606598
Diffstat (limited to '.buildkite/hooks/pre-command')
-rw-r--r-- | .buildkite/hooks/pre-command | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 7d277202b..4f41fe021 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -1,3 +1,15 @@ +# Install packages we need. Docker must be installed and configured, +# as should Go itself. We just install some extra bits and pieces. +function install_pkgs() { + while true; do + if sudo apt-get update && sudo apt-get install -y "$@"; then + break + fi + done +} +install_pkgs graphviz jq curl binutils gnupg gnupg-agent linux-libc-dev \ + apt-transport-https ca-certificates software-properties-common + # 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. @@ -9,3 +21,10 @@ if test "${EXPERIMENTAL}" != "true"; then make sudo TARGETS=//runsc:runsc ARGS="install --experimental=true" sudo systemctl restart docker fi + +# Helper for benchmarks, based on the branch. +if test "${BUILDKITE_BRANCH}" = "master"; then + export BENCHMARKS_OFFICIAL=true +else + export BENCHMARKS_OFFICIAL=false +fi
\ No newline at end of file |