Skip to content

Commit b5921c7

Browse files
committed
test(NODE-6495): make drivers tools a subnodule
1 parent b2511f0 commit b5921c7

12 files changed

+23
-16
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ functions:
1313
params:
1414
directory: src
1515
shallow_clone: true
16+
recurse_submodules: true
1617
- command: subprocess.exec
1718
params:
1819
working_dir: src

.evergreen/docker/Dockerfile.musl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ EOF
1616
# clone drivers evergreen tools into the same location that it lives on the host machine
1717
# this ensures any paths configured in variables by drivers-evergreen-tools work
1818
# in the container too.
19-
ARG DRIVERS_TOOLS=drivers-evergreen-tools
20-
WORKDIR ${DRIVERS_TOOLS}
21-
RUN git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git .
19+
# ARG DRIVERS_TOOLS=drivers-evergreen-tools
20+
# WORKDIR ${DRIVERS_TOOLS}
21+
# RUN git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git .

.evergreen/prepare-mongodb-aws-ecs-auth.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cat $ECS_SRC_DIR/.evergreen/run-mongodb-aws-ecs-test.sh
2121

2222
# tar the file and drivers tools and do the same
2323
cd ..
24-
tar -czf src.tgz src drivers-tools
24+
tar -czf src.tgz src
2525
mv src.tgz $ECS_SRC_DIR/src.tgz
2626

2727
export MONGODB_BINARIES="${MONGODB_BINARIES}"

.evergreen/prepare-shell.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66

77
# This script prepares a shell to run the remaining scripts in this folder
88
# It MUST be kept idempotent! It will overwrite the orchestration config and expansion.yml file upon every run
9-
# and it will only clone drivers-tools if they do not exist one directory above our driver src
109

1110
PROJECT_DIRECTORY="$(pwd)"
12-
DRIVERS_TOOLS=$(cd .. && echo "$(pwd)/drivers-tools")
11+
DRIVERS_TOOLS="$(pwd)/drivers-evergreen-tools"
1312
MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
1413
MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
1514
UPLOAD_BUCKET="${project}"
@@ -30,12 +29,11 @@ export MONGODB_BINARIES
3029
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
3130
export PATH="$MONGODB_BINARIES:$PATH"
3231

33-
if [ ! -d "$DRIVERS_TOOLS" ]; then
34-
# Only clone driver tools if it does not exist
35-
git clone --depth=1 "https://github.com/mongodb-labs/drivers-evergreen-tools.git" "${DRIVERS_TOOLS}"
36-
fi
32+
# Note the evergreen option on git.get_project recurse_submodules does not work, so do it here.
33+
git submodule init
34+
git submodule update
3735

38-
echo "installed DRIVERS_TOOLS from commit $(git -C "${DRIVERS_TOOLS}" rev-parse HEAD)"
36+
ls -la $DRIVERS_TOOLS
3937

4038
cat <<EOT > "$MONGO_ORCHESTRATION_HOME/orchestration.config"
4139
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export AZUREKMS_PUBLICKEYPATH=/tmp/testazurekms_publickey
1111
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
1212

1313
echo "compressing node driver source and tools ... begin"
14-
tar -czf node-driver-source.tgz src drivers-tools
14+
tar -czf node-driver-source.tgz src
1515
echo "compressing node driver source and tools ... end"
1616

1717
export AZUREKMS_SRC=node-driver-source.tgz

.evergreen/run-mongodb-aws-ecs-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o errexit # Exit the script with error if any of the commands fail
55
export MONGODB_URI="$1"
66

77
tar -xzf src/src.tgz
8-
# produces src/ and drivers-tools/
8+
# produces src/
99

1010
cd src
1111

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit # Exit the script with error if any of the commands fail
44

55
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
66
cd ..
7-
tar -czf $AZUREOIDC_DRIVERS_TAR_FILE src drivers-tools
7+
tar -czf $AZUREOIDC_DRIVERS_TAR_FILE src
88
cd -
99
export AZUREOIDC_TEST_CMD="source ./env.sh && cd src && ENVIRONMENT=azure ./.evergreen/${SCRIPT}"
1010
export PROJECT_DIRECTORY=$PROJECT_DIRECTORY

.evergreen/run-oidc-tests-gcp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit # Exit the script with error if any of the commands fail
44

55
export GCPOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
66
cd ..
7-
tar -czf $GCPOIDC_DRIVERS_TAR_FILE src drivers-tools
7+
tar -czf $GCPOIDC_DRIVERS_TAR_FILE src
88
cd -
99
export GCPOIDC_TEST_CMD="source ./secrets-export.sh drivers/gcpoidc && cd src && ENVIRONMENT=gcp ./.evergreen/${SCRIPT}"
1010
export PROJECT_DIRECTORY=$PROJECT_DIRECTORY

.evergreen/run-oidc-tests-k8s.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit # Exit the script with error if any of the commands fail
44

55
export K8S_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
66
cd ..
7-
tar -czf $K8S_DRIVERS_TAR_FILE src drivers-tools
7+
tar -czf $K8S_DRIVERS_TAR_FILE src
88
cd -
99
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/setup-pod.sh
1010
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/k8s/run-self-test.sh

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
version: 2
77
updates:
8+
- package-ecosystem: "gitsubmodule" # See documentation for possible values
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
812
- package-ecosystem: "github-actions" # See documentation for possible values
913
directory: "/" # Location of package manifests
1014
schedule:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "drivers-evergreen-tools"]
2+
path = drivers-evergreen-tools
3+
url = https://github.com/mongodb-labs/drivers-evergreen-tools.git

drivers-evergreen-tools

Submodule drivers-evergreen-tools added at cec0139

0 commit comments

Comments
 (0)