diff --git a/.evergreen/docker/run-local.sh b/.evergreen/docker/run-local.sh index fc7c519c..2e5db34f 100755 --- a/.evergreen/docker/run-local.sh +++ b/.evergreen/docker/run-local.sh @@ -11,7 +11,7 @@ PLATFORM=${DOCKER_PLATFORM:-} # e.g. --platform linux/amd64 docker build $PLATFORM -t $NAME $IMAGE -pushd ../.. +cd ../.. AUTH=${AUTH:-noauth} SSL=${SSL:-nossl} @@ -25,15 +25,15 @@ MONGODB_DOWNLOAD_URL=${MONGODB_DOWNLOAD_URL:-} ORCHESTRATION_FILE=${ORCHESTRATION_FILE:-basic.json} ENV="-e MONGODB_VERSION=$MONGODB_VERSION" -ENV="$ENV -e TOPOLOGY=$TOPOLOGY" -ENV="$ENV -e AUTH=$AUTH" -ENV="$ENV -e SSL=$SSL" -ENV="$ENV -e ORCHESTRATION_FILE=$ORCHESTRATION_FILE" -ENV="$ENV -e LOAD_BALANCER=$LOAD_BALANCER" -ENV="$ENV -e STORAGE_ENGINE=$STORAGE_ENGINE" -ENV="$ENV -e REQUIRE_API_VERSION=$REQUIRE_API_VERSION" -ENV="$ENV -e DISABLE_TEST_COMMANDS=$DISABLE_TEST_COMMANDS" -ENV="$ENV -e MONGODB_DOWNLOAD_URL=$MONGODB_DOWNLOAD_URL" +ENV+=" -e TOPOLOGY=$TOPOLOGY" +ENV+=" -e AUTH=$AUTH" +ENV+=" -e SSL=$SSL" +ENV+=" -e ORCHESTRATION_FILE=$ORCHESTRATION_FILE" +ENV+=" -e LOAD_BALANCER=$LOAD_BALANCER" +ENV+=" -e STORAGE_ENGINE=$STORAGE_ENGINE" +ENV+=" -e REQUIRE_API_VERSION=$REQUIRE_API_VERSION" +ENV+=" -e DISABLE_TEST_COMMANDS=$DISABLE_TEST_COMMANDS" +ENV+=" -e MONGODB_DOWNLOAD_URL=$MONGODB_DOWNLOAD_URL" if [ "$TOPOLOGY" == "server" ]; then PORT="-p 27017:2017" diff --git a/.evergreen/docker/ubuntu20.04/Dockerfile b/.evergreen/docker/ubuntu20.04/Dockerfile index 89d92dd9..ba7a479b 100644 --- a/.evergreen/docker/ubuntu20.04/Dockerfile +++ b/.evergreen/docker/ubuntu20.04/Dockerfile @@ -17,6 +17,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ net-tools \ && rm -rf /var/lib/apt/lists/* +ARG USER_ID +ARG GROUP_ID + +RUN addgroup --gid $GROUP_ID user +RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user +USER user + ENV DRIVERS_TOOLS=/root/drivers-evergreen-tools ENV PROJECT_ORCHESTRATION_HOME=/root/drivers-evergreen-tools/.evergreen/orchestration ENV MONGODB_BINARIES=/root/drivers-evergreen-tools/mongodb/bin diff --git a/.evergreen/docker/ubuntu20.04/test-entrypoint.sh b/.evergreen/docker/ubuntu20.04/test-entrypoint.sh index 789ff3fe..17261806 100755 --- a/.evergreen/docker/ubuntu20.04/test-entrypoint.sh +++ b/.evergreen/docker/ubuntu20.04/test-entrypoint.sh @@ -4,3 +4,4 @@ set -eu cd $DRIVERS_TOOLS/.evergreen bash run-orchestration.sh echo "Success!" +echo '{"results": [{ "status": "SUCCESS", "test_file": "Run", "log_raw": "run-orchestration.sh succeeded!" } ]}' >|${PROJECT_DIRECTORY}/test-results.json diff --git a/.evergreen/run-orchestration.sh b/.evergreen/run-orchestration.sh index fbe4df46..3e1e9a51 100755 --- a/.evergreen/run-orchestration.sh +++ b/.evergreen/run-orchestration.sh @@ -31,14 +31,12 @@ DIR=$(dirname $0) . $DIR/download-mongodb.sh # Find python3 if we are running in bash. +export PYTHON="" if [ -n "$BASH" ]; then . $DIR/find-python3.sh echo "Finding Python3 binary..." - export PYTHON PYTHON="$(find_python3 2>/dev/null)" echo "Finding Python3 binary... done." -else - export PYTHON="" fi get_distro diff --git a/.evergreen/start-orchestration.sh b/.evergreen/start-orchestration.sh index ca41f536..60652295 100755 --- a/.evergreen/start-orchestration.sh +++ b/.evergreen/start-orchestration.sh @@ -29,6 +29,8 @@ if [ -z "$PYTHON" ];then echo "Finding Python3 binary..." PYTHON="$(find_python3 2>/dev/null)" || return echo "Finding Python3 binary... done." +else + echo "Using Python3 binary: $PYTHON" fi echo "Creating virtual environment 'venv'..."