From 40cda29522dc51d38b830e95a588d85a70834ad5 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 16 Oct 2024 16:27:44 -0500 Subject: [PATCH] [ci] Cache chromedriver Chromedriver is currently downloaded at runtime on each agent. We know the expected version of Chrome at image build time, and can install the matching driver at the same time instead. This sets XDG_CACHE_HOME to $HOME/.cache. Details on the specification can be found at https://specifications.freedesktop.org/basedir-spec/latest/. Other binaries, including cypress, playwright, bazelisk and yarn respect this environment variable, but are already falling back to the .cache directory. --- .buildkite/scripts/common/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/common/env.sh b/.buildkite/scripts/common/env.sh index 511f6ead2d43c..2704f894cf2b6 100755 --- a/.buildkite/scripts/common/env.sh +++ b/.buildkite/scripts/common/env.sh @@ -8,6 +8,7 @@ KIBANA_DIR=$(pwd) export KIBANA_DIR export XPACK_DIR="$KIBANA_DIR/x-pack" +export XDG_CACHE_HOME="$HOME/.cache" export CACHE_DIR="$HOME/.kibana" export ES_CACHE_DIR="$HOME/.es-snapshot-cache" PARENT_DIR="$(cd "$KIBANA_DIR/.."; pwd)" @@ -110,7 +111,6 @@ export TEST_CORS_SERVER_PORT=6105 if [[ "$(which google-chrome-stable)" || "$(which google-chrome)" ]]; then echo "Chrome detected, setting DETECT_CHROMEDRIVER_VERSION=true" export DETECT_CHROMEDRIVER_VERSION=true - export CHROMEDRIVER_FORCE_DOWNLOAD=true else echo "Chrome not detected, installing default chromedriver binary for the package version" fi