diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 75864f7e..9269349a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1303,7 +1303,7 @@ buildvariants: - name: releng-release-archive-creator display_name: "** Release Archive Creator" run_on: - - ubuntu2004-large + - ubuntu2004-small tasks: - ".releng" # Run all tasks with the "releng" tag @@ -1311,7 +1311,7 @@ buildvariants: - name: tests-docker display_name: Docker run_on: - - ubuntu2204-large + - ubuntu2204-small tasks: - ".docker" # Run all tasks with the "docker" tag diff --git a/.evergreen/docker/ubuntu18.04/Dockerfile b/.evergreen/docker/ubuntu18.04/Dockerfile index fd7414ec..cb3ad810 100644 --- a/.evergreen/docker/ubuntu18.04/Dockerfile +++ b/.evergreen/docker/ubuntu18.04/Dockerfile @@ -7,6 +7,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ curl \ wget \ sudo \ + make \ gnupg \ python \ lsof \ diff --git a/.evergreen/docker/ubuntu18.04/base-entrypoint.sh b/.evergreen/docker/ubuntu18.04/base-entrypoint.sh index 642c7895..2404dfa7 100755 --- a/.evergreen/docker/ubuntu18.04/base-entrypoint.sh +++ b/.evergreen/docker/ubuntu18.04/base-entrypoint.sh @@ -1,18 +1,13 @@ #!/usr/bin/env bash set -eu -# Clear out files that might interfere. -rm -f $DRIVERS_TOOLS/results.json -rm -rf /tmp/mongo* -rm -f $DRIVERS_TOOLS/.env - # Start the server. -cd $DRIVERS_TOOLS/.evergreen -bash run-orchestration.sh +cd $DRIVERS_TOOLS +make run-server # Preserve host permissions of files we have created. cd $DRIVERS_TOOLS -files=(results.json uri.txt .evergreen/mongo_crypt_v1.so .evergreen/mo-expansion.yml) +files=(results.json uri.txt mongo_crypt_v1.so mo-expansion.yml) chown --reference=action.yml "${files[@]}" chmod --reference=action.yml "${files[@]}" diff --git a/.evergreen/docker/ubuntu18.04/test-entrypoint.sh b/.evergreen/docker/ubuntu18.04/test-entrypoint.sh index c8caaf4f..71d8fba8 100755 --- a/.evergreen/docker/ubuntu18.04/test-entrypoint.sh +++ b/.evergreen/docker/ubuntu18.04/test-entrypoint.sh @@ -2,7 +2,7 @@ set -eu bash /root/base-entrypoint.sh -source $DRIVERS_TOOLS/.evergreen/mo-expansion.sh +source $DRIVERS_TOOLS/mo-expansion.sh URI="mongodb://127.0.0.1:27017/?serverSelectionTimeoutMS=10000" $MONGODB_BINARIES/mongosh $URI --eval "db.runCommand({\"ping\":1})" echo "Test complete!" diff --git a/.evergreen/docker/ubuntu20.04/Dockerfile b/.evergreen/docker/ubuntu20.04/Dockerfile index 9ec866d7..4bfff37d 100644 --- a/.evergreen/docker/ubuntu20.04/Dockerfile +++ b/.evergreen/docker/ubuntu20.04/Dockerfile @@ -6,6 +6,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ curl \ wget \ + make \ sudo \ gnupg \ python \ diff --git a/.evergreen/docker/ubuntu20.04/base-entrypoint.sh b/.evergreen/docker/ubuntu20.04/base-entrypoint.sh index 642c7895..2404dfa7 100755 --- a/.evergreen/docker/ubuntu20.04/base-entrypoint.sh +++ b/.evergreen/docker/ubuntu20.04/base-entrypoint.sh @@ -1,18 +1,13 @@ #!/usr/bin/env bash set -eu -# Clear out files that might interfere. -rm -f $DRIVERS_TOOLS/results.json -rm -rf /tmp/mongo* -rm -f $DRIVERS_TOOLS/.env - # Start the server. -cd $DRIVERS_TOOLS/.evergreen -bash run-orchestration.sh +cd $DRIVERS_TOOLS +make run-server # Preserve host permissions of files we have created. cd $DRIVERS_TOOLS -files=(results.json uri.txt .evergreen/mongo_crypt_v1.so .evergreen/mo-expansion.yml) +files=(results.json uri.txt mongo_crypt_v1.so mo-expansion.yml) chown --reference=action.yml "${files[@]}" chmod --reference=action.yml "${files[@]}" diff --git a/.evergreen/docker/ubuntu20.04/test-entrypoint.sh b/.evergreen/docker/ubuntu20.04/test-entrypoint.sh index c8caaf4f..71d8fba8 100755 --- a/.evergreen/docker/ubuntu20.04/test-entrypoint.sh +++ b/.evergreen/docker/ubuntu20.04/test-entrypoint.sh @@ -2,7 +2,7 @@ set -eu bash /root/base-entrypoint.sh -source $DRIVERS_TOOLS/.evergreen/mo-expansion.sh +source $DRIVERS_TOOLS/mo-expansion.sh URI="mongodb://127.0.0.1:27017/?serverSelectionTimeoutMS=10000" $MONGODB_BINARIES/mongosh $URI --eval "db.runCommand({\"ping\":1})" echo "Test complete!" diff --git a/.evergreen/handle-paths.sh b/.evergreen/handle-paths.sh index 68247d89..b01d7c0a 100755 --- a/.evergreen/handle-paths.sh +++ b/.evergreen/handle-paths.sh @@ -40,6 +40,7 @@ case "$(uname -s)" in DRIVERS_TOOLS=$(cygpath -m "$DRIVERS_TOOLS") # USERPROFILE is required by Python for pathlib.Path().expanduser(~). if [ -z "${USERPROFILE:-}" ]; then + export USERPROFILE USERPROFILE=$(cygpath -m "$HOME") fi ;; diff --git a/Makefile b/Makefile index e67a1d41..efce50a4 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,16 @@ all: @echo "Project successfully compiled" clean: - rm -rf mongodb + @echo "Cleaning files..." + rm -rf ./mongodb .env results.json mo-expansion* + rm -rf "$${TMPDIR:-$${TEMP:-$${TMP:-/tmp}}}"/mongo* run-server: clean + @echo "Running server..." .evergreen/run-orchestration.sh stop-server: + @echo "Stopping server..." .evergreen/stop-orchestration.sh test: