Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(NODE-6400): migrate node download script to drivers-tools #4244

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 48 additions & 27 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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}
Expand All @@ -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"
Expand All @@ -373,6 +377,7 @@ functions:
timeout_secs: 60
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_URI: ${MONGODB_URI}
binary: bash
args:
Expand All @@ -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}
Expand Down Expand Up @@ -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":
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
75 changes: 49 additions & 26 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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
Expand All @@ -335,6 +339,7 @@ functions:
timeout_secs: 60
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_URI: ${MONGODB_URI}
binary: bash
args:
Expand All @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .evergreen/copy-driver-to-azure-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="./"
Expand All @@ -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"
echo "Running test ... end"
Loading