From c0f72989f4f3678960658ac1f75b0ca6380d48be Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Fri, 16 Sep 2022 04:17:26 +0100 Subject: [PATCH] [centipede][base-builder] Properly delete bazel cache (#8494) Fixes #8468 Co-authored-by: Alan32Liu --- infra/base-images/base-builder/precompile_centipede | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infra/base-images/base-builder/precompile_centipede b/infra/base-images/base-builder/precompile_centipede index 9d49a5dd4..f14cb7133 100755 --- a/infra/base-images/base-builder/precompile_centipede +++ b/infra/base-images/base-builder/precompile_centipede @@ -36,4 +36,10 @@ echo 'Removing extra stuff leftover to avoid bloating image.' rm -rf /clang-*.tgz /clang +BAZEL_BIN_REAL_DIR=$(readlink -f $SRC/centipede/bazel-bin) +rm -rf $SRC/centipede/bazel-bin +mkdir -p $SRC/centipede/bazel-bin +mv $BAZEL_BIN_REAL_DIR/{centipede,libcentipede_runner.pic.a} $SRC/centipede/bazel-bin/ +rm -rf /root/.cache + echo 'Done.'