Skip to content

Commit 057ab6d

Browse files
chore: add files for evergreen
1 parent 17a8b96 commit 057ab6d

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#! /bin/bash
2+
3+
[ -s "$PROJECT_DIRECTORY/node-artifacts/nvm/nvm.sh" ] && source "$PROJECT_DIRECTORY"/node-artifacts/nvm/nvm.sh
4+
5+
BRANCH='NODE-5076-azure-kms-providers'
6+
7+
git clone -b $BRANCH https://github.com/mongodb/libmongocrypt.git
8+
9+
pushd libmongocrypt/bindings/node
10+
11+
PATH=$(pwd)
12+
13+
npm install
14+
15+
npm pack | tee npm-pack.log
16+
17+
TARBALL_FILENAME="$(tail -n1 npm-pack.log)"
18+
TARBALL_LOCATION="$(pwd)/$TARBALL_FILENAME"
19+
20+
popd
21+
22+
npm install $TARBALL_LOCATION
23+
24+
npm list
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! /usr/bin/env bash
2+
3+
source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
4+
5+
echo "compressing node driver source ... begin"
6+
tar -czf node-driver-source.tgz - src
7+
echo "compressing node driver source ... end"
8+
9+
export AZUREKMS_DST="./"
10+
echo "copying node driver tar ... begin"
11+
"${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/copy-file.sh"
12+
echo "copying node driver tar ... end"
13+
14+
echo "decompressing node driver tar on azure ... begin"
15+
AZUREKMS_CMD="tar xf node-driver-source.tgz"
16+
"${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/run-command.sh"
17+
echo "decompressing node driver tar on azure ... end"

.evergreen/kms/setup-azure-vm.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! /usr/bin/env bash
2+
3+
echo '${testazurekms_publickey}' > /tmp/testazurekms_publickey
4+
echo '${testazurekms_privatekey}' > /tmp/testazurekms_privatekey
5+
# Set 600 permissions on private key file. Otherwise ssh / scp may error with permissions "are too open".
6+
chmod 600 /tmp/testazurekms_privatekey
7+
export AZUREKMS_CLIENTID=${testazurekms_clientid}
8+
export AZUREKMS_TENANTID=${testazurekms_tenantid}
9+
export AZUREKMS_SECRET=${testazurekms_secret}
10+
export AZUREKMS_DRIVERS_TOOLS=$DRIVERS_TOOLS
11+
export AZUREKMS_RESOURCEGROUP=${testazurekms_resourcegroup}
12+
export AZUREKMS_PUBLICKEYPATH=/tmp/testazurekms_publickey
13+
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
14+
export AZUREKMS_SCOPE=${testazurekms_scope}
15+
export AZUREKMS_VMNAME_PREFIX=NODEDRIVER
16+
17+
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/create-and-setup-vm.sh

.evergreen/run-azure-kms-tests.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /usr/bin/env bash
2+
3+
set -o errexit
4+
5+
pushd "src"
6+
PROJECT_DIRECTORY="$(pwd)"
7+
export PROJECT_DIRECTORY
8+
source ".evergreen/init-nvm.sh"
9+
10+
set -o xtrace
11+
12+
npm install '[email protected]'
13+
14+
export MONGODB_URI="mongodb://localhost:27017"
15+
16+
export EXPECTED_AZUREKMS_OUTCOME=${EXPECTED_AZUREKMS_OUTCOME:-omitted}
17+
export TEST_CSFLE=true
18+
export CSFLE_KMS_PROVIDERS='not json'
19+
20+
npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.19.on_demand_azure.test.ts

0 commit comments

Comments
 (0)