From 27618ae6a43a45cbd83c266c05a7e5309317604f Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 10 Oct 2024 11:48:01 -0400 Subject: [PATCH] chore(NODE-6400): migrate node download script to drivers-tools (#4244) --- .evergreen/config.in.yml | 75 ++++++++----- .evergreen/config.yml | 75 ++++++++----- .evergreen/copy-driver-to-azure-and-run.sh | 10 +- .evergreen/init-node-and-npm-env.sh | 21 ---- .evergreen/install-dependencies.sh | 106 ++---------------- .../install-mongodb-client-encryption.sh | 12 +- .evergreen/prepare-shell.sh | 5 +- .evergreen/run-atlas-tests.sh | 2 +- .evergreen/run-azure-kms-tests.sh | 6 +- .evergreen/run-benchmarks.sh | 2 +- .evergreen/run-custom-csfle-tests.sh | 2 +- .evergreen/run-data-lake-tests.sh | 2 +- .evergreen/run-gcp-kms-tests.sh | 6 +- .evergreen/run-kerberos-tests.sh | 2 +- .evergreen/run-lambda-aws-tests.sh | 2 +- .evergreen/run-lambda-tests.sh | 2 +- .evergreen/run-ldap-tests.sh | 2 +- .evergreen/run-lint-checks.sh | 2 +- .evergreen/run-mongodb-aws-ecs-test.sh | 12 +- .evergreen/run-mongodb-aws-test.sh | 2 +- .evergreen/run-mongosh-integration-tests.sh | 2 +- .evergreen/run-mongosh-scope-test.sh | 2 +- .evergreen/run-ocsp-tests.sh | 2 +- .evergreen/run-oidc-prose-tests.sh | 6 +- .evergreen/run-oidc-tests-azure.sh | 8 +- .evergreen/run-oidc-tests-gcp.sh | 8 +- .evergreen/run-oidc-tests-test.sh | 2 +- .evergreen/run-oidc-unified-tests.sh | 8 +- ...resource-management-feature-integration.sh | 2 +- .evergreen/run-resource-management.sh | 2 +- .../run-search-index-management-tests.sh | 2 +- .evergreen/run-serverless-tests.sh | 2 +- .evergreen/run-socks5-tests.sh | 2 +- .evergreen/run-tests.sh | 2 +- .evergreen/run-tls-tests.sh | 2 +- .evergreen/run-typescript.sh | 2 +- .evergreen/run-unit-tests.sh | 2 +- .evergreen/run-x509-tests.sh | 2 +- .evergreen/setup-gcp-testing.sh | 4 +- .gitignore | 2 + 40 files changed, 185 insertions(+), 227 deletions(-) delete mode 100644 .evergreen/init-node-and-npm-env.sh diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 85c963ad7a..ccbc4e18c7 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -322,6 +322,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - "${PROJECT_DIRECTORY}/.evergreen/run-lint-checks.sh" @@ -334,6 +335,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - "${PROJECT_DIRECTORY}/.evergreen/run-unit-tests.sh" @@ -346,6 +348,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} TS_VERSION: ${TS_VERSION} TS_CHECK: CHECK_TYPES TYPES_VERSION: ${TYPES_VERSION} @@ -361,6 +364,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - "${PROJECT_DIRECTORY}/.evergreen/run-resource-management.sh" @@ -373,6 +377,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} MONGODB_URI: ${MONGODB_URI} binary: bash args: @@ -386,6 +391,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} TS_VERSION: ${TS_VERSION} TS_CHECK: COMPILE_DRIVER TYPES_VERSION: ${TYPES_VERSION} @@ -464,7 +470,7 @@ functions: working_dir: "src" script: | ${PREPARE_SHELL} - source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" + source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh rm -rf ./node_modules/@aws-sdk/credential-providers "run atlas tests": @@ -473,6 +479,8 @@ functions: params: working_dir: "src" binary: bash + env: + DRIVERS_TOOLS: ${DRIVERS_TOOLS} args: - -c - ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect @@ -482,6 +490,7 @@ functions: working_dir: "src" binary: bash env: + DRIVERS_TOOLS: ${DRIVERS_TOOLS} NODE_LTS_VERSION: ${NODE_LTS_VERSION} args: - .evergreen/run-atlas-tests.sh @@ -527,43 +536,49 @@ functions: bash ${PROJECT_DIRECTORY}/.evergreen/run-socks5-tests.sh "run kerberos tests": - - command: shell.exec + - command: subprocess.exec type: test params: + binary: bash working_dir: src - script: | - export PROJECT_DIRECTORY="$(pwd)" - export KRB5_KEYTAB='${gssapi_auth_keytab_base64}' - export KRB5_NEW_KEYTAB='${gssapi_auth_new_keytab_base64}' - export KRB5_PRINCIPAL='${gssapi_auth_principal}' - export MONGODB_URI='${gssapi_auth_mongodb_uri}' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + KRB5_KEYTAB: ${gssapi_auth_keytab_base64} + KRB5_NEW_KEYTAB: ${gssapi_auth_new_keytab_base64} + KRB5_PRINCIPAL: ${gssapi_auth_principal} + MONGODB_URI: ${gssapi_auth_mongodb_uri} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-kerberos-tests.sh "run ldap tests": - - command: shell.exec + - command: subprocess.exec type: test params: - working_dir: "src" - script: | - export PROJECT_DIRECTORY="$(pwd)" - export MONGODB_URI='${plain_auth_mongodb_uri}' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh + working_dir: src + binary: bash + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + MONGODB_URI: ${plain_auth_mongodb_uri} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-ldap-tests.sh "run data lake tests": - - command: shell.exec + - command: subprocess.exec type: test params: working_dir: src - script: | - export PROJECT_DIRECTORY="$(pwd)" - export MONGODB_URI='mongodb://mhuser:pencil@localhost' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh + binary: bash + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + MONGODB_URI: "mongodb://mhuser:pencil@localhost" + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-data-lake-tests.sh "run tls tests": - command: shell.exec @@ -856,7 +871,11 @@ functions: echo "npm run check:aws" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen - tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY . + + cd .. + tar -czf src.tgz src drivers-tools + mv src.tgz $ECS_SRC_DIR/src.tgz + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws . ./activate-authawsvenv.sh @@ -973,6 +992,7 @@ functions: env: MONGODB_URI: ${MONGODB_URI} PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - "${PROJECT_DIRECTORY}/.evergreen/run-lambda-tests.sh" @@ -1106,6 +1126,7 @@ functions: env: INSTALL_DIR: mongodb-client-encryption PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b912ff0ff7..8c3ba94ed4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -288,6 +288,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/run-lint-checks.sh @@ -299,6 +300,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/run-unit-tests.sh @@ -310,6 +312,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} TS_VERSION: ${TS_VERSION} TS_CHECK: CHECK_TYPES TYPES_VERSION: ${TYPES_VERSION} @@ -324,6 +327,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/run-resource-management.sh @@ -335,6 +339,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} MONGODB_URI: ${MONGODB_URI} binary: bash args: @@ -347,6 +352,7 @@ functions: timeout_secs: 60 env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} TS_VERSION: ${TS_VERSION} TS_CHECK: COMPILE_DRIVER TYPES_VERSION: ${TYPES_VERSION} @@ -418,13 +424,15 @@ functions: working_dir: src script: | ${PREPARE_SHELL} - source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" + source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh rm -rf ./node_modules/@aws-sdk/credential-providers run atlas tests: - command: subprocess.exec params: working_dir: src binary: bash + env: + DRIVERS_TOOLS: ${DRIVERS_TOOLS} args: - '-c' - ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect @@ -434,6 +442,7 @@ functions: working_dir: src binary: bash env: + DRIVERS_TOOLS: ${DRIVERS_TOOLS} NODE_LTS_VERSION: ${NODE_LTS_VERSION} args: - .evergreen/run-atlas-tests.sh @@ -490,41 +499,47 @@ functions: bash ${PROJECT_DIRECTORY}/.evergreen/run-socks5-tests.sh run kerberos tests: - - command: shell.exec + - command: subprocess.exec type: test params: + binary: bash working_dir: src - script: | - export PROJECT_DIRECTORY="$(pwd)" - export KRB5_KEYTAB='${gssapi_auth_keytab_base64}' - export KRB5_NEW_KEYTAB='${gssapi_auth_new_keytab_base64}' - export KRB5_PRINCIPAL='${gssapi_auth_principal}' - export MONGODB_URI='${gssapi_auth_mongodb_uri}' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + KRB5_KEYTAB: ${gssapi_auth_keytab_base64} + KRB5_NEW_KEYTAB: ${gssapi_auth_new_keytab_base64} + KRB5_PRINCIPAL: ${gssapi_auth_principal} + MONGODB_URI: ${gssapi_auth_mongodb_uri} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-kerberos-tests.sh run ldap tests: - - command: shell.exec + - command: subprocess.exec type: test params: working_dir: src - script: | - export PROJECT_DIRECTORY="$(pwd)" - export MONGODB_URI='${plain_auth_mongodb_uri}' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh + binary: bash + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + MONGODB_URI: ${plain_auth_mongodb_uri} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-ldap-tests.sh run data lake tests: - - command: shell.exec + - command: subprocess.exec type: test params: working_dir: src - script: | - export PROJECT_DIRECTORY="$(pwd)" - export MONGODB_URI='mongodb://mhuser:pencil@localhost' - export NODE_LTS_VERSION='${NODE_LTS_VERSION}' - - bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh + binary: bash + env: + PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} + MONGODB_URI: mongodb://mhuser:pencil@localhost + NODE_LTS_VERSION: ${NODE_LTS_VERSION} + args: + - .evergreen/run-data-lake-tests.sh run tls tests: - command: shell.exec type: test @@ -817,7 +832,13 @@ functions: cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen - tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY . + + cd .. + + tar -czf src.tgz src drivers-tools + + mv src.tgz $ECS_SRC_DIR/src.tgz + cd ${DRIVERS_TOOLS}/.evergreen/auth_aws @@ -942,6 +963,7 @@ functions: env: MONGODB_URI: ${MONGODB_URI} PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/run-lambda-tests.sh @@ -1065,6 +1087,7 @@ functions: env: INSTALL_DIR: mongodb-client-encryption PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + DRIVERS_TOOLS: ${DRIVERS_TOOLS} binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh diff --git a/.evergreen/copy-driver-to-azure-and-run.sh b/.evergreen/copy-driver-to-azure-and-run.sh index 7adbdf08fc..46fc4aa2e3 100644 --- a/.evergreen/copy-driver-to-azure-and-run.sh +++ b/.evergreen/copy-driver-to-azure-and-run.sh @@ -6,14 +6,14 @@ source "${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/secrets-export.sh" if [ -z ${AZUREKMS_RESOURCEGROUP+omitted} ]; then echo "AZUREKMS_RESOURCEGROUP is unset" && exit 1; fi if [ -z ${AZUREKMS_VMNAME+omitted} ]; then echo "AZUREKMS_VMNAME is unset" && exit 1; fi -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh export AZUREKMS_PUBLICKEYPATH=/tmp/testazurekms_publickey export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey -echo "compressing node driver source ... begin" -tar -czf node-driver-source.tgz src -echo "compressing node driver source ... end" +echo "compressing node driver source and tools ... begin" +tar -czf node-driver-source.tgz src drivers-tools +echo "compressing node driver source and tools ... end" export AZUREKMS_SRC=node-driver-source.tgz export AZUREKMS_DST="./" @@ -29,4 +29,4 @@ echo "decompressing node driver tar on azure ... end" echo "Running test ... begin" export AZUREKMS_CMD="env EXPECTED_AZUREKMS_OUTCOME=success bash src/.evergreen/run-azure-kms-tests.sh" ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/run-command.sh -echo "Running test ... end" \ No newline at end of file +echo "Running test ... end" diff --git a/.evergreen/init-node-and-npm-env.sh b/.evergreen/init-node-and-npm-env.sh deleted file mode 100644 index b3cecf54e3..0000000000 --- a/.evergreen/init-node-and-npm-env.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env bash -## -## This script add the location of `npm` and `node` to the path. -## This is necessary because evergreen uses separate bash scripts for -## different functions in a given CI run but doesn't persist the environment -## across them. So we manually invoke this script everywhere we need -## access to `npm`, `node`, or need to install something globally from -## npm. - -NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" -if [[ "$OS" == "Windows_NT" ]]; then - NODE_ARTIFACTS_PATH=$(cygpath --unix "$NODE_ARTIFACTS_PATH") -fi - -export NODE_ARTIFACTS_PATH -# npm uses this environment variable to determine where to install global packages -export npm_global_prefix=$NODE_ARTIFACTS_PATH/npm_global -export PATH="$npm_global_prefix/bin:$NODE_ARTIFACTS_PATH/nodejs/bin:$PATH" -hash -r - -export NODE_OPTIONS="--trace-deprecation --trace-warnings" diff --git a/.evergreen/install-dependencies.sh b/.evergreen/install-dependencies.sh index 515722b22b..ef56c295fb 100644 --- a/.evergreen/install-dependencies.sh +++ b/.evergreen/install-dependencies.sh @@ -5,111 +5,19 @@ set -o errexit # Exit the script with error if any of the commands fail ## a nodejs major version (i.e., 16) ## 'latest' ## a full nodejs version, in the format v..patch -NODE_LTS_VERSION=${NODE_LTS_VERSION:-16} +export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16} # npm version can be defined in the environment for cases where we need to install # a version lower than latest to support EOL Node versions. -NPM_VERSION=${NPM_VERSION:-latest} -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" - -if [[ -z "${npm_global_prefix}" ]]; then echo "npm_global_prefix is unset" && exit 1; fi -if [[ -z "${NODE_ARTIFACTS_PATH}" ]]; then echo "NODE_ARTIFACTS_PATH is unset" && exit 1; fi - -CURL_FLAGS=( - --fail # Exit code 1 if request fails - --compressed # Request a compressed response should keep fetching fast - --location # Follow a redirect - --retry 8 # Retry HTTP 408, 429, 500, 502, 503 or 504, 8 times - --silent # Do not print a progress bar - --show-error # Despite the silent flag still print out errors - --max-time 900 # 900 seconds is 15 minutes, evergreen times out at 20 - --continue-at - # If a download is interrupted it can figure out where to resume -) - -mkdir -p "$NODE_ARTIFACTS_PATH/npm_global" - -# Comparisons are all case insensitive -shopt -s nocasematch - -# index.tab is a sorted tab separated values file with the following headers -# 0 1 2 3 4 5 6 7 8 9 10 -# version date files npm v8 uv zlib openssl modules lts security -curl "${CURL_FLAGS[@]}" "https://nodejs.org/dist/index.tab" --output node_index.tab - -while IFS=$'\t' read -r -a row; do - node_index_version="${row[0]}" - node_index_major_version=$(echo $node_index_version | sed -E 's/^v([0-9]+).*$/\1/') - node_index_date="${row[1]}" - node_index_lts="${row[9]}" - [[ "$node_index_version" = "version" ]] && continue # skip tsv header - [[ "$NODE_LTS_VERSION" = "latest" ]] && break # first line is latest - [[ "$NODE_LTS_VERSION" = "$node_index_version" ]] && break # match full version if specified - [[ "$NODE_LTS_VERSION" = "$node_index_major_version" ]] && break # case insensitive compare -done < node_index.tab - -if [[ "$OS" = "Windows_NT" ]]; then - operating_system="win" -elif [[ $(uname) = "darwin" ]]; then - operating_system="darwin" -elif [[ $(uname) = "linux" ]]; then - operating_system="linux" -else - echo "Unable to determine operating system: $operating_system" - exit 1 -fi - -architecture=$(uname -m) -if [[ $architecture = "x86_64" ]]; then - architecture="x64" -elif [[ $architecture = "arm64" ]]; then - architecture="arm64" -elif [[ $architecture = "aarch64" ]]; then - architecture="arm64" -elif [[ $architecture == s390* ]]; then - architecture="s390x" -elif [[ $architecture == ppc* ]]; then - architecture="ppc64le" +# If NODE_LTS_VERSION is numeric and less than 18, default to 9. Do not override if it is already set. +if [[ "$NODE_LTS_VERSION" =~ ^[0-9]+$ && "$NODE_LTS_VERSION" -lt 18 ]]; then + export NPM_VERSION=${NPM_VERSION:-9} else - echo "Unable to determine operating system: $architecture" - exit 1 -fi - -file_extension="tar.gz" -if [[ "$OS" = "Windows_NT" ]]; then file_extension="zip"; fi - -node_directory="node-${node_index_version}-${operating_system}-${architecture}" -node_archive="${node_directory}.${file_extension}" -node_archive_path="$NODE_ARTIFACTS_PATH/${node_archive}" -node_download_url="https://nodejs.org/dist/${node_index_version}/${node_archive}" - -echo "Node.js ${node_index_version} for ${operating_system}-${architecture} released on ${node_index_date}" - -set -o xtrace - -curl "${CURL_FLAGS[@]}" "${node_download_url}" --output "$node_archive_path" - -if [[ "$file_extension" = "zip" ]]; then - unzip -q "$node_archive_path" -d "${NODE_ARTIFACTS_PATH}" - mkdir -p "${NODE_ARTIFACTS_PATH}/nodejs" - # Windows "bins" are at the top level - mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs/bin" - # Need to add executable flag ourselves - chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/node.exe" - chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/npm" -else - tar -xf "$node_archive_path" -C "${NODE_ARTIFACTS_PATH}" - mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs" -fi - -if [[ $operating_system != "win" ]]; then - # Update npm to latest when we can - npm install --global npm@$NPM_VERSION - hash -r + export NPM_VERSION=${NPM_VERSION:-latest} fi -echo "npm location: $(which npm)" -echo "npm version: $(npm -v)" +source $DRIVERS_TOOLS/.evergreen/install-node.sh npm install "${NPM_OPTIONS}" -npm ls +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh diff --git a/.evergreen/install-mongodb-client-encryption.sh b/.evergreen/install-mongodb-client-encryption.sh index 80432960f3..1bea94950b 100644 --- a/.evergreen/install-mongodb-client-encryption.sh +++ b/.evergreen/install-mongodb-client-encryption.sh @@ -1,18 +1,20 @@ #! /usr/bin/env bash -set +o xtrace + +set -o xtrace # Write all commands first to stderr +set -o errexit # Exit the script with error if any of the commands fail # Initial checks for running these tests if [ -z ${PROJECT_DIRECTORY+omitted} ]; then echo "PROJECT_DIRECTORY is unset" && exit 1; fi -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" - -set -o xtrace # Write all commands first to stderr -set -o errexit # Exit the script with error if any of the commands fail +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh rm -rf mongodb-client-encryption git clone https://github.com/mongodb-js/mongodb-client-encryption.git pushd mongodb-client-encryption +node --version +npm --version + if [ -n "${LIBMONGOCRYPT_VERSION}" ]; then # nightly tests test with `latest` to test against the laster FLE build. npm run install:libmongocrypt -- --build --libVersion $LIBMONGOCRYPT_VERSION diff --git a/.evergreen/prepare-shell.sh b/.evergreen/prepare-shell.sh index 7a097d2e6d..af8cd4a00e 100644 --- a/.evergreen/prepare-shell.sh +++ b/.evergreen/prepare-shell.sh @@ -1,7 +1,8 @@ #! /usr/bin/env bash -set -o xtrace -set -o errexit +# Only set errexit and xtrace if shell is NOT interactive +[[ $- == *i* ]] || set -o xtrace +[[ $- == *i* ]] || set -o errexit # This script prepares a shell to run the remaining scripts in this folder # It MUST be kept idempotent! It will overwrite the orchestration config and expansion.yml file upon every run diff --git a/.evergreen/run-atlas-tests.sh b/.evergreen/run-atlas-tests.sh index 694cefaf43..fa1715872c 100644 --- a/.evergreen/run-atlas-tests.sh +++ b/.evergreen/run-atlas-tests.sh @@ -7,7 +7,7 @@ if test -f secrets-export.sh; then fi PROJECT_DIRECTORY=${PROJECT_DIRECTORY:-"."} -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh node -v diff --git a/.evergreen/run-azure-kms-tests.sh b/.evergreen/run-azure-kms-tests.sh index 87292d49d6..dfdcd03223 100644 --- a/.evergreen/run-azure-kms-tests.sh +++ b/.evergreen/run-azure-kms-tests.sh @@ -5,7 +5,11 @@ set -o errexit pushd "src" PROJECT_DIRECTORY="$(pwd)" export PROJECT_DIRECTORY -source ".evergreen/init-node-and-npm-env.sh" +source "$PROJECT_DIRECTORY/.evergreen/prepare-shell.sh" + +bash "$PROJECT_DIRECTORY/.evergreen/install-dependencies.sh" + +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o xtrace diff --git a/.evergreen/run-benchmarks.sh b/.evergreen/run-benchmarks.sh index 8e1bf31899..b26c2afa21 100644 --- a/.evergreen/run-benchmarks.sh +++ b/.evergreen/run-benchmarks.sh @@ -1,6 +1,6 @@ #! /bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh export MONGODB_URI=$MONGODB_URI diff --git a/.evergreen/run-custom-csfle-tests.sh b/.evergreen/run-custom-csfle-tests.sh index e0cd68d782..5b0a3c9685 100644 --- a/.evergreen/run-custom-csfle-tests.sh +++ b/.evergreen/run-custom-csfle-tests.sh @@ -12,7 +12,7 @@ export CSFLE_KMS_PROVIDERS=${CSFLE_KMS_PROVIDERS} export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} echo "csfle CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail diff --git a/.evergreen/run-data-lake-tests.sh b/.evergreen/run-data-lake-tests.sh index 8f62a1f16a..6f2d9608b4 100644 --- a/.evergreen/run-data-lake-tests.sh +++ b/.evergreen/run-data-lake-tests.sh @@ -2,7 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh echo "$MONGODB_URI" npm run check:adl diff --git a/.evergreen/run-gcp-kms-tests.sh b/.evergreen/run-gcp-kms-tests.sh index 510894f320..4ce06b0301 100644 --- a/.evergreen/run-gcp-kms-tests.sh +++ b/.evergreen/run-gcp-kms-tests.sh @@ -5,7 +5,11 @@ set -o errexit pushd "src" PROJECT_DIRECTORY="$(pwd)" export PROJECT_DIRECTORY -source ".evergreen/init-node-and-npm-env.sh" +source "$PROJECT_DIRECTORY/.evergreen/prepare-shell.sh" + +bash "$PROJECT_DIRECTORY/.evergreen/install-dependencies.sh" + +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o xtrace diff --git a/.evergreen/run-kerberos-tests.sh b/.evergreen/run-kerberos-tests.sh index 12338bd92b..0a398956b9 100644 --- a/.evergreen/run-kerberos-tests.sh +++ b/.evergreen/run-kerberos-tests.sh @@ -2,7 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # set up keytab mkdir -p "$(pwd)/.evergreen" diff --git a/.evergreen/run-lambda-aws-tests.sh b/.evergreen/run-lambda-aws-tests.sh index 685d178182..bf9ec2cdfb 100644 --- a/.evergreen/run-lambda-aws-tests.sh +++ b/.evergreen/run-lambda-aws-tests.sh @@ -8,7 +8,7 @@ MONGODB_URI=${MONGODB_URI:-} set +x # load node.js environment -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # the default connection string, may be overridden by the environment script export MONGODB_URI="mongodb://localhost:27017/aws" diff --git a/.evergreen/run-lambda-tests.sh b/.evergreen/run-lambda-tests.sh index be7101a188..279766965f 100644 --- a/.evergreen/run-lambda-tests.sh +++ b/.evergreen/run-lambda-tests.sh @@ -8,6 +8,6 @@ MONGODB_URI=${MONGODB_URI:-} set +x # load node.js environment -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh npm run check:lambda diff --git a/.evergreen/run-ldap-tests.sh b/.evergreen/run-ldap-tests.sh index 3354aab303..574359fe8b 100644 --- a/.evergreen/run-ldap-tests.sh +++ b/.evergreen/run-ldap-tests.sh @@ -2,6 +2,6 @@ set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh npm run check:ldap diff --git a/.evergreen/run-lint-checks.sh b/.evergreen/run-lint-checks.sh index 1c57972c31..dbb5690ee9 100644 --- a/.evergreen/run-lint-checks.sh +++ b/.evergreen/run-lint-checks.sh @@ -1,7 +1,7 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # Attempt to update our EVG config # if it changes, crash so that any gen script changes are forced to be run before pushing diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 54e95e8da8..bcbfff4a08 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -3,14 +3,16 @@ set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail export MONGODB_URI="$1" -PROJECT_DIRECTORY="$(pwd)/src" -# untar packed archive -cd $PROJECT_DIRECTORY -tar -xzf src.tgz . +tar -xzf src/src.tgz +# produces src/ and drivers-tools/ + +cd src + +source ./.evergreen/prepare-shell.sh # should not run git clone # load node.js -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # run the tests npm install aws4 diff --git a/.evergreen/run-mongodb-aws-test.sh b/.evergreen/run-mongodb-aws-test.sh index fac9495584..65614a9d35 100755 --- a/.evergreen/run-mongodb-aws-test.sh +++ b/.evergreen/run-mongodb-aws-test.sh @@ -8,7 +8,7 @@ MONGODB_URI=${MONGODB_URI:-} set +x # load node.js environment -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # the default connection string, may be overridden by the environment script export MONGODB_URI="mongodb://localhost:27017/aws?authMechanism=MONGODB-AWS" diff --git a/.evergreen/run-mongosh-integration-tests.sh b/.evergreen/run-mongosh-integration-tests.sh index a12f3db678..eccf6617bb 100644 --- a/.evergreen/run-mongosh-integration-tests.sh +++ b/.evergreen/run-mongosh-integration-tests.sh @@ -16,7 +16,7 @@ if [ -z ${TASK_ID+omitted} ]; then echo "TASK_ID is unset" && exit 1; fi MONGOSH_RUN_ONLY_IN_PACKAGE=${MONGOSH_RUN_ONLY_IN_PACKAGE:-""} -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh npm cache clear --force || true npm install --global npm@8.x || true diff --git a/.evergreen/run-mongosh-scope-test.sh b/.evergreen/run-mongosh-scope-test.sh index 99345bc0ac..e2477dda4c 100644 --- a/.evergreen/run-mongosh-scope-test.sh +++ b/.evergreen/run-mongosh-scope-test.sh @@ -2,7 +2,7 @@ if [ -z ${TASK_ID+omitted} ]; then echo "TASK_ID is unset" && exit 1; fi -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh MONGOSH_DIRECTORY="/tmp/$TASK_ID" git clone --depth=10 https://github.com/mongodb-js/mongosh.git $MONGOSH_DIRECTORY diff --git a/.evergreen/run-ocsp-tests.sh b/.evergreen/run-ocsp-tests.sh index a9006714e3..824d5ea430 100644 --- a/.evergreen/run-ocsp-tests.sh +++ b/.evergreen/run-ocsp-tests.sh @@ -3,7 +3,7 @@ set -o xtrace set -o errexit # load node.js environment -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh # $PYTHON_BINARY -m virtualenv --never-download --no-wheel ocsptest # . ocsptest/bin/activate diff --git a/.evergreen/run-oidc-prose-tests.sh b/.evergreen/run-oidc-prose-tests.sh index ae9de15d36..1f19612979 100755 --- a/.evergreen/run-oidc-prose-tests.sh +++ b/.evergreen/run-oidc-prose-tests.sh @@ -2,9 +2,13 @@ set -o errexit # Exit the script with error if any of the commands fail set -o xtrace # Write all commands first to stderr +[[ -d "src/.evergreen" ]] && cd src # when on azure or gcp we are above the src directory + +source ./.evergreen/prepare-shell.sh + ENVIRONMENT=${ENVIRONMENT:-"test"} PROJECT_DIRECTORY=${PROJECT_DIRECTORY:-"."} -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh if [ -z "${MONGODB_URI_SINGLE}" ]; then echo "Must specify MONGODB_URI_SINGLE" diff --git a/.evergreen/run-oidc-tests-azure.sh b/.evergreen/run-oidc-tests-azure.sh index 4fa7c5bd55..5ce21d65d9 100644 --- a/.evergreen/run-oidc-tests-azure.sh +++ b/.evergreen/run-oidc-tests-azure.sh @@ -3,8 +3,10 @@ set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz -tar czf $AZUREOIDC_DRIVERS_TAR_FILE . -export AZUREOIDC_TEST_CMD="source ./env.sh && ENVIRONMENT=azure ./.evergreen/${SCRIPT}" +cd .. +tar -czf $AZUREOIDC_DRIVERS_TAR_FILE src drivers-tools +cd - +export AZUREOIDC_TEST_CMD="source ./env.sh && cd src && ENVIRONMENT=azure ./.evergreen/${SCRIPT}" export PROJECT_DIRECTORY=$PROJECT_DIRECTORY export ENVIRONMENT=$ENVIRONMENT -bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh \ No newline at end of file +bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh diff --git a/.evergreen/run-oidc-tests-gcp.sh b/.evergreen/run-oidc-tests-gcp.sh index f2fc1de2dc..3ec71bfc4a 100644 --- a/.evergreen/run-oidc-tests-gcp.sh +++ b/.evergreen/run-oidc-tests-gcp.sh @@ -3,8 +3,10 @@ set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail export GCPOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz -tar czf $GCPOIDC_DRIVERS_TAR_FILE . -export GCPOIDC_TEST_CMD="source ./secrets-export.sh drivers/gcpoidc && ENVIRONMENT=gcp ./.evergreen/${SCRIPT}" +cd .. +tar -czf $GCPOIDC_DRIVERS_TAR_FILE src drivers-tools +cd - +export GCPOIDC_TEST_CMD="source ./secrets-export.sh drivers/gcpoidc && cd src && ENVIRONMENT=gcp ./.evergreen/${SCRIPT}" export PROJECT_DIRECTORY=$PROJECT_DIRECTORY export ENVIRONMENT=$ENVIRONMENT -bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh \ No newline at end of file +bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh diff --git a/.evergreen/run-oidc-tests-test.sh b/.evergreen/run-oidc-tests-test.sh index 59389bc0ca..e4f1c3bfb6 100644 --- a/.evergreen/run-oidc-tests-test.sh +++ b/.evergreen/run-oidc-tests-test.sh @@ -8,4 +8,4 @@ export ENVIRONMENT=$ENVIRONMENT printenv export AWS_WEB_IDENTITY_TOKEN_FILE=$OIDC_TOKEN_FILE ls -la $OIDC_TOKEN_DIR -bash ./.evergreen/${SCRIPT} \ No newline at end of file +bash ./.evergreen/${SCRIPT} diff --git a/.evergreen/run-oidc-unified-tests.sh b/.evergreen/run-oidc-unified-tests.sh index 051256a64f..15a5e0d08f 100755 --- a/.evergreen/run-oidc-unified-tests.sh +++ b/.evergreen/run-oidc-unified-tests.sh @@ -2,9 +2,13 @@ set -o errexit # Exit the script with error if any of the commands fail set -o xtrace # Write all commands first to stderr +[[ -d "src/.evergreen" ]] && cd src # when on azure or gcp we are above the src directory + +source ./.evergreen/prepare-shell.sh + ENVIRONMENT=${ENVIRONMENT:-"test"} PROJECT_DIRECTORY=${PROJECT_DIRECTORY:-"."} -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh if [ "$ENVIRONMENT" = "test" ]; then export OIDC_TOKEN_DIR=${OIDC_TOKEN_DIR} @@ -13,4 +17,4 @@ fi export UTIL_CLIENT_USER=$OIDC_ADMIN_USER export UTIL_CLIENT_PASSWORD=$OIDC_ADMIN_PWD -npm run check:oidc-auth \ No newline at end of file +npm run check:oidc-auth diff --git a/.evergreen/run-resource-management-feature-integration.sh b/.evergreen/run-resource-management-feature-integration.sh index 70854dae1d..093a4749d7 100644 --- a/.evergreen/run-resource-management-feature-integration.sh +++ b/.evergreen/run-resource-management-feature-integration.sh @@ -1,6 +1,6 @@ #! /bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh echo "Building driver..." npm pack diff --git a/.evergreen/run-resource-management.sh b/.evergreen/run-resource-management.sh index ff7737b1c5..f656bec493 100644 --- a/.evergreen/run-resource-management.sh +++ b/.evergreen/run-resource-management.sh @@ -1,5 +1,5 @@ #! /bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh npm run check:resource-management diff --git a/.evergreen/run-search-index-management-tests.sh b/.evergreen/run-search-index-management-tests.sh index 2dc1f34e5c..652540c69f 100644 --- a/.evergreen/run-search-index-management-tests.sh +++ b/.evergreen/run-search-index-management-tests.sh @@ -1,5 +1,5 @@ #! /bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh npm run check:search-indexes diff --git a/.evergreen/run-serverless-tests.sh b/.evergreen/run-serverless-tests.sh index bc4c83ed67..32322e56b1 100755 --- a/.evergreen/run-serverless-tests.sh +++ b/.evergreen/run-serverless-tests.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh if [ -z ${SERVERLESS+omitted} ]; then echo "SERVERLESS is unset" && exit 1; fi if [ -z ${SERVERLESS_URI+omitted} ]; then echo "SERVERLESS_URI is unset" && exit 1; fi diff --git a/.evergreen/run-socks5-tests.sh b/.evergreen/run-socks5-tests.sh index 7dab6a9a06..f0e146e7c6 100644 --- a/.evergreen/run-socks5-tests.sh +++ b/.evergreen/run-socks5-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o errexit # Exit the script with error if any of the commands fail set -o xtrace # For debuggability, no external credentials are used here diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 080857cd38..755732b9de 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -29,7 +29,7 @@ echo "Running $AUTH tests over $SSL, connecting to $MONGODB_URI" if [[ -z "${SKIP_DEPS}" ]]; then source "${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh" else - source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" + source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh fi if [ "$COMPRESSOR" != "" ]; then diff --git a/.evergreen/run-tls-tests.sh b/.evergreen/run-tls-tests.sh index 88b21a82e4..eee6efbadb 100644 --- a/.evergreen/run-tls-tests.sh +++ b/.evergreen/run-tls-tests.sh @@ -2,7 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh export TLS_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem" export TLS_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem" diff --git a/.evergreen/run-typescript.sh b/.evergreen/run-typescript.sh index 9bd212eb70..dd37a8717e 100755 --- a/.evergreen/run-typescript.sh +++ b/.evergreen/run-typescript.sh @@ -1,7 +1,7 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh case $TS_CHECK in COMPILE_DRIVER|CHECK_TYPES) # Ok diff --git a/.evergreen/run-unit-tests.sh b/.evergreen/run-unit-tests.sh index a1ab8e3a1a..bd08017dfa 100644 --- a/.evergreen/run-unit-tests.sh +++ b/.evergreen/run-unit-tests.sh @@ -1,7 +1,7 @@ #!/bin/bash set -o errexit # Exit the script with error if any of the commands fail -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o xtrace npx nyc npm run check:unit diff --git a/.evergreen/run-x509-tests.sh b/.evergreen/run-x509-tests.sh index 0e65800cb1..29c481142e 100644 --- a/.evergreen/run-x509-tests.sh +++ b/.evergreen/run-x509-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh set -o errexit diff --git a/.evergreen/setup-gcp-testing.sh b/.evergreen/setup-gcp-testing.sh index eb99674067..b74191bd86 100644 --- a/.evergreen/setup-gcp-testing.sh +++ b/.evergreen/setup-gcp-testing.sh @@ -10,14 +10,14 @@ if [ -z ${GCPKMS_INSTANCENAME+omitted} ]; then echo "GCPKMS_INSTANCENAME is unse set -o errexit -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh export GCPKMS_SRC=node-driver-source.tgz export GCPKMS_DST=$GCPKMS_INSTANCENAME: # Box up the entire driver and it's node_modules echo "compressing node driver source ... begin" -tar -czf $GCPKMS_SRC src +tar -czf $GCPKMS_SRC src $DRIVERS_TOOLS echo "compressing node driver source ... end" echo "copying node driver tar ... begin" diff --git a/.gitignore b/.gitignore index cb5e9e4ec8..687f037b0e 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ secrets-export.sh mo-expansion.sh mo-expansion.yml expansions.sh + +.drivers-tools/