From 82b2fa756db6f344779a613354e72ad907e50eba Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 3 Feb 2025 14:27:32 +0100 Subject: [PATCH] fix(ci): use more resilient approach for installing docker test dependencies Our docker tests partially require `mongodb-crypt-library-version` to be present in `scripts/docker/node_modules`, installing it there directly and explicitly is more reliable than running `npm ci` in the monorepo root and copying `node_modules` over from there (esp. since `npm ci` may not work after packages have been bumped as part of a relase). --- scripts/docker/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/docker/build.sh b/scripts/docker/build.sh index 15b359c9ab..5e8e23473e 100755 --- a/scripts/docker/build.sh +++ b/scripts/docker/build.sh @@ -4,7 +4,8 @@ set -e cd "$(dirname "$0")" # Used for verifying that we actually have a working csfle shared library -[ -x node_modules/mongodb-crypt-library-version ] || ((cd ../.. && npm ci) && cp -r ../../node_modules node_modules) +# --prefix=$PWD prevents npm from detecing the monorepo root and installing anything there +[ -x node_modules/mongodb-crypt-library-version ] || (npm install --prefix="$PWD") # we don't have credentials for registry.suse.com and docker now requires them due to our config if [[ "$1" == suse* ]]; then