Skip to content

Commit 6e831fa

Browse files
authored
fix(ci): use more resilient approach for installing docker test dependencies (#2348)
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).
1 parent 47caa20 commit 6e831fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/docker/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set -e
44
cd "$(dirname "$0")"
55

66
# Used for verifying that we actually have a working csfle shared library
7-
[ -x node_modules/mongodb-crypt-library-version ] || ((cd ../.. && npm ci) && cp -r ../../node_modules node_modules)
7+
# --prefix=$PWD prevents npm from detecing the monorepo root and installing anything there
8+
[ -x node_modules/mongodb-crypt-library-version ] || (npm install --prefix="$PWD")
89

910
# we don't have credentials for registry.suse.com and docker now requires them due to our config
1011
if [[ "$1" == suse* ]]; then

0 commit comments

Comments
 (0)