Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 25, 2023
1 parent b6df968 commit 0b009e6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .evergreen/docker/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions .evergreen/docker/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .evergreen/docker/ubuntu20.04/test-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions .evergreen/run-orchestration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .evergreen/start-orchestration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'..."
Expand Down

0 comments on commit 0b009e6

Please sign in to comment.