Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 29 additions & 26 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ functions:
go version
go env

# Install taskfile.
go install github.com/go-task/task/v3/cmd/task@latest

# Install libmongocrypt.
bash etc/install-libmongocrypt.sh
task install-libmongocrypt
if [ "Windows_NT" = "$OS" ]; then
export PATH=$PATH:/cygdrive/c/libmongocrypt/bin
fi
Expand Down Expand Up @@ -276,17 +279,17 @@ functions:
script: |
${PREPARE_SHELL}
export OIDC="oidc"
bash ${PROJECT_DIRECTORY}/etc/run-oidc-test.sh 'make -s evg-test-oidc-auth'
task test-oidc

run-make:
run-task:
- command: shell.exec
type: test
params:
shell: "bash"
working_dir: src/go.mongodb.org/mongo-driver
script: |
${PREPARE_SHELL}
${BUILD_ENV|} BUILD_TAGS=${BUILD_TAGS|-tags=cse,gssapi} make ${targets}
${BUILD_ENV|} BUILD_TAGS=${BUILD_TAGS|-tags=cse,gssapi} task ${targets}

run-tests:
- command: shell.exec
Expand All @@ -309,7 +312,7 @@ functions:
${PREPARE_SHELL}
export BASE_SHA=${revision}
export HEAD_SHA=${github_commit}
bash etc/api_report.sh
task api-report

"add PR labels":
- command: shell.exec
Expand Down Expand Up @@ -391,7 +394,7 @@ functions:
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
script: |
${PREPARE_SHELL}
bash etc/run-atlas-test.sh
task test-atlas

run-ocsp-test:
- command: shell.exec
Expand All @@ -411,7 +414,7 @@ functions:
TOPOLOGY="server" \
MONGODB_URI="${MONGODB_URI}" \
OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \
make evg-test-ocsp
task evg-test-ocsp

run-versioned-api-test:
- command: shell.exec
Expand Down Expand Up @@ -441,7 +444,7 @@ functions:
BUILD_TAGS="-tags=cse" \
REQUIRE_API_VERSION="${REQUIRE_API_VERSION}" \
CRYPT_SHARED_LIB_PATH="$CRYPT_SHARED_LIB_PATH" \
make evg-test-versioned-api \
task evg-test-versioned-api \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH

Expand Down Expand Up @@ -488,7 +491,7 @@ functions:
MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" \
TOPOLOGY="${TOPOLOGY}" \
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
make evg-test-load-balancers
task evg-test-load-balancers

run-serverless-tests:
- command: shell.exec
Expand All @@ -512,7 +515,7 @@ functions:
SSL="nossl" \
TOPOLOGY="server" \
MONGODB_URI="mongodb://mhuser:pencil@localhost" \
make evg-test-atlas-data-lake
task evg-test-atlas-data-lake

run-docker-test:
- command: shell.exec
Expand All @@ -522,8 +525,8 @@ functions:
working_dir: src/go.mongodb.org/mongo-driver
script: |
${PREPARE_SHELL}
bash etc/run_docker.sh
TOPOLOGY=sharded_cluster bash etc/run_docker.sh test-short
task run-docker
TOPOLOGY=sharded_cluster task run-docker -- test-short

run-valid-ocsp-server:
- command: shell.exec
Expand Down Expand Up @@ -608,7 +611,7 @@ functions:
script: |
${PREPARE_SHELL}
TEST_INDEX_URI="${TEST_INDEX_URI}" \
make evg-test-search-index
task evg-test-search-index

add-aws-auth-variables-to-file:
- command: ec2.assume_role
Expand Down Expand Up @@ -688,7 +691,7 @@ functions:
echo "This platform does not support the ECS auth test, skipping..."
exit 0
fi
make build-aws-ecs-test
task build-aws-ecs-test
- command: shell.exec
type: test
params:
Expand Down Expand Up @@ -773,7 +776,7 @@ functions:
TOPOLOGY="${TOPOLOGY}" \
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
BUILD_TAGS="-tags=cse" \
make evg-test-kms \
task evg-test-kms \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH

Expand All @@ -794,7 +797,7 @@ functions:
TOPOLOGY="${TOPOLOGY}" \
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
BUILD_TAGS="-tags=cse" \
make evg-test-kmip \
task evg-test-kmip \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH

Expand All @@ -820,7 +823,7 @@ tasks:
- name: static-analysis
tags: ["static-analysis"]
commands:
- func: run-make
- func: run-task
vars:
targets: "check-fmt check-license check-modules lint"

Expand All @@ -845,7 +848,7 @@ tasks:
TOPOLOGY: "server"
AUTH: "noauth"
SSL: "nossl"
- func: run-make
- func: run-task
vars:
targets: driver-benchmark
- func: send-perf-data
Expand Down Expand Up @@ -1591,7 +1594,7 @@ tasks:
- name: go1.18-build
tags: ["compile-check"]
commands:
- func: run-make
- func: run-task
vars:
targets: "build-compile-check"
BUILD_ENV: "PATH=/opt/golang/go1.18/bin:$PATH GOROOT=/opt/golang/go1.18"
Expand All @@ -1600,7 +1603,7 @@ tasks:
- name: build
tags: ["compile-check"]
commands:
- func: run-make
- func: run-task
vars:
targets: "build"

Expand Down Expand Up @@ -1724,7 +1727,7 @@ tasks:
echo "Building build-kms-test ... begin"
BUILD_TAGS="-tags=cse" \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
make build-kms-test
task build-kms-test
echo "Building build-kms-test ... end"
source $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/secrets-export.sh
echo "Copying files ... begin"
Expand Down Expand Up @@ -1760,7 +1763,7 @@ tasks:
echo "Building build-kms-test ... begin"
BUILD_TAGS="-tags=cse" \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
make build-kms-test
task build-kms-test
echo "Building build-kms-test ... end"
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
MONGODB_URI='mongodb://localhost:27017/' \
Expand All @@ -1777,7 +1780,7 @@ tasks:
working_dir: src/go.mongodb.org/mongo-driver
script: |
${PREPARE_SHELL}
bash etc/run-awskms-test.sh
task test-awskms

- name: "testawskms-fail-task"
# testawskms-fail-task runs without environment variables.
Expand All @@ -1791,7 +1794,7 @@ tasks:
script: |
${PREPARE_SHELL}
export EXPECT_ERROR='status=400'
bash etc/run-awskms-test.sh
task test-awskms

- name: "testazurekms-task"
commands:
Expand All @@ -1805,7 +1808,7 @@ tasks:
echo "Building build-kms-test ... begin"
BUILD_TAGS="-tags=cse" \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
make build-kms-test
task build-kms-test
echo "Building build-kms-test ... end"

echo "Copying files ... begin"
Expand Down Expand Up @@ -1841,7 +1844,7 @@ tasks:
echo "Building build-kms-test ... begin"
BUILD_TAGS="-tags=cse" \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
make build-kms-test
task build-kms-test
echo "Building build-kms-test ... end"

LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
Expand Down
8 changes: 4 additions & 4 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ else
echo "crypt_shared library will be loaded from path: $CRYPT_SHARED_LIB_PATH"
fi

if [ -z ${MAKEFILE_TARGET+x} ]; then
if [ -z ${TASKFILE_TARGET+x} ]; then
if [ "$(uname -s)" = "Darwin" ]; then
# Run a subset of the tests on Darwin
MAKEFILE_TARGET="evg-test-load-balancers"
TASKFILE_TARGET="evg-test-load-balancers"
else
MAKEFILE_TARGET="evg-test"
TASKFILE_TARGET="evg-test"
fi
fi

Expand All @@ -99,4 +99,4 @@ CRYPT_SHARED_LIB_PATH=$CRYPT_SHARED_LIB_PATH \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
MACOS_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH \
make $MAKEFILE_TARGET
task $TASKFILE_TARGET
6 changes: 4 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
languages: go
build-mode: manual

- name: Install Taskfile support
uses: arduino/setup-task@v2

- shell: bash
run: |
make build
run: task build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get -qqy install --option Acquire::Retries=100 --option Acquire::http::Timeout="60" --no-install-recommends golang-go && \
rm -rf /var/lib/apt/lists/*

# Install taskfile
RUN go install github.com/go-task/task/v3/cmd/task@latest

COPY ./etc/docker_entry.sh /root/docker_entry.sh

COPY --from=libmongocrypt /root/install /root/install
Expand Down
Loading
Loading