Skip to content

Commit

Permalink
GODRIVER-2924 Set up coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 13, 2023
1 parent 84a4385 commit 668d8ae
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:22.04

RUN apt-get -qq update && apt-get -qqy -o DPkg::Lock::Timeout=-1 install --no-install-recommends \
git \
ca-certificates \
curl \
wget \
sudo \
gnupg \
python3 \
python3.10-venv \
build-essential \
golang-go \
pkg-config \
libssl-dev \
make \
lsof \
net-tools \
&& rm -rf /var/lib/apt/lists/*

RUN export LIBMONGOCRYPT_TAG="1.8.0-alpha1" && \
cd $HOME && \
git clone https://github.com/mongodb/libmongocrypt --depth=1 --branch $LIBMONGOCRYPT_TAG && \
PKG_CONFIG_PATH=$HOME/install/libmongocrypt/lib/pkgconfig:$HOME/install/mongo-c-driver/lib/pkgconfig \
LD_LIBRARY_PATH=$HOME/install/libmongocrypt/lib \
./libmongocrypt/.evergreen/compile.sh

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

ENTRYPOINT ["/bin/bash", "/root/docker_entry.sh"]
32 changes: 32 additions & 0 deletions etc/docker_entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# Entry point for Dockerfile for launching a server and running a go test.
#
set -eux

# TODO: make some things configurable

export MONGODB_VERSION=latest
export TOPOLOGY=replica_set
export ORCHESTRATION_FILE=basic.json
export DRIVERS_TOOLS=$HOME/drivers-evergreen-tools
export PROJECT_ORCHESTRATION_HOME=$DRIVERS_TOOLS/.evergreen/orchestration
export MONGO_ORCHESTRATION_HOME=$HOME

if [ ! -d $DRIVERS_TOOLS ]; then
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
fi

# Disable ipv6
sed -i "s/\"ipv6\": true,/\"ipv6\": false,/g" $PROJECT_ORCHESTRATION_HOME/configs/${TOPOLOGY}s/$ORCHESTRATION_FILE


bash $DRIVERS_TOOLS/.evergreen/run-orchestration.sh

cd /src
export GOPATH=$(go env GOPATH)
export GOCACHE="$(pwd)/.cache"
export LD_LIBRARY_PATH=$HOME/install/libmongocrypt/lib
export PKG_CONFIG_PATH=$HOME/install/libmongocrypt/lib/pkgconfig:$HOME/install/mongo-c-driver/lib/pkgconfig
export BUILD_TAGS="-tags=cse"
make evg-test

0 comments on commit 668d8ae

Please sign in to comment.