Skip to content

Commit

Permalink
GODRIVER-2792 Migrate CI to RHEL 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Aug 25, 2023
1 parent 99d53d6 commit 3c4e203
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 67 deletions.
69 changes: 30 additions & 39 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ functions:
export UPLOAD_BUCKET="$UPLOAD_BUCKET"
export PROJECT="$PROJECT"
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
export PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib/pkgconfig:$(pwd)/install/mongo-c-driver/lib/pkgconfig
export LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib
export PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib64/pkgconfig:$(pwd)/install/mongo-c-driver/lib/pkgconfig
export LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib64
export PATH="$PATH"
EOT
# See what we variables we've set.
Expand All @@ -163,7 +163,9 @@ functions:
# If this was a patch build, doing a fresh clone would not actually test the patch
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
else
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
#git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
#
git clone --branch godriver-2792 https://github.com/prestonvasquez/drivers-evergreen-tools $DRIVERS_TOOLS
fi
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
- command: shell.exec
Expand Down Expand Up @@ -245,6 +247,7 @@ functions:
params:
shell: "bash"
script: |
set -x
${PREPARE_SHELL}
MONGODB_VERSION=${VERSION} \
Expand Down Expand Up @@ -2101,7 +2104,7 @@ tasks:
export GCPKMS_PROJECT=${GCPKMS_PROJECT}
export GCPKMS_ZONE=${GCPKMS_ZONE}
export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
tar czf testgcpkms.tgz ./testkms ./install/libmongocrypt/lib/libmongocrypt.*
tar czf testgcpkms.tgz ./testkms ./install/libmongocrypt/lib64/libmongocrypt.*
GCPKMS_SRC=testgcpkms.tgz GCPKMS_DST=$GCPKMS_INSTANCENAME: $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/copy-file.sh
echo "Copying files ... end"
Expand All @@ -2120,7 +2123,7 @@ tasks:
export GCPKMS_PROJECT=${GCPKMS_PROJECT}
export GCPKMS_ZONE=${GCPKMS_ZONE}
export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
GCPKMS_CMD="LD_LIBRARY_PATH=./install/libmongocrypt/lib MONGODB_URI='mongodb://localhost:27017' PROVIDER='gcp' ./testkms" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
GCPKMS_CMD="LD_LIBRARY_PATH=./install/libmongocrypt/lib64 MONGODB_URI='mongodb://localhost:27017' PROVIDER='gcp' ./testkms" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
- name: "testgcpkms-fail-task"
# testgcpkms-fail-task runs in a non-GCE environment.
Expand All @@ -2138,7 +2141,7 @@ tasks:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
make build-kms-test
echo "Building build-kms-test ... end"
LD_LIBRARY_PATH=./install/libmongocrypt/lib \
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
MONGODB_URI='mongodb://localhost:27017/' \
EXPECT_ERROR='unable to retrieve GCP credentials' \
PROVIDER='gcp' \
Expand All @@ -2162,7 +2165,7 @@ tasks:
export AWS_ACCESS_KEY_ID="${cse_aws_access_key_id}"
export AWS_SECRET_ACCESS_KEY="${cse_aws_secret_access_key}"
LD_LIBRARY_PATH=./install/libmongocrypt/lib \
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
MONGODB_URI='${atlas_free_tier_uri}' \
PROVIDER='aws' \
./testkms
Expand All @@ -2184,7 +2187,7 @@ tasks:
make build-kms-test
echo "Building build-kms-test ... end"
LD_LIBRARY_PATH=./install/libmongocrypt/lib \
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
MONGODB_URI='${atlas_free_tier_uri}' \
EXPECT_ERROR='unable to retrieve aws credentials' \
PROVIDER='aws' \
Expand All @@ -2210,7 +2213,7 @@ tasks:
export AZUREKMS_VMNAME=${AZUREKMS_VMNAME}
echo '${testazurekms_privatekey}' > /tmp/testazurekms.prikey
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms.prikey
tar czf testazurekms.tgz ./testkms ./install/libmongocrypt/lib/libmongocrypt.*
tar czf testazurekms.tgz ./testkms ./install/libmongocrypt/lib64/libmongocrypt.*
AZUREKMS_SRC=testazurekms.tgz AZUREKMS_DST=/tmp $DRIVERS_TOOLS/.evergreen/csfle/azurekms/copy-file.sh
echo "Copying files ... end"
echo "Untarring file ... begin"
Expand All @@ -2228,7 +2231,7 @@ tasks:
export AZUREKMS_VMNAME=${AZUREKMS_VMNAME}
echo '${testazurekms_privatekey}' > /tmp/testazurekms.prikey
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms.prikey
AZUREKMS_CMD="LD_LIBRARY_PATH=./install/libmongocrypt/lib MONGODB_URI='mongodb://localhost:27017' PROVIDER='azure' ./testkms" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
AZUREKMS_CMD="LD_LIBRARY_PATH=./install/libmongocrypt/lib64 MONGODB_URI='mongodb://localhost:27017' PROVIDER='azure' ./testkms" $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
- name: "testazurekms-fail-task"
# testazurekms-fail-task runs without environment variables.
Expand All @@ -2247,7 +2250,7 @@ tasks:
make build-kms-test
echo "Building build-kms-test ... end"
LD_LIBRARY_PATH=./install/libmongocrypt/lib \
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
MONGODB_URI='mongodb://localhost:27017' \
EXPECT_ERROR='unable to retrieve azure credentials' \
PROVIDER='azure' \
Expand Down Expand Up @@ -2330,11 +2333,6 @@ axes:
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
GO_DIST: "C:\\golang\\go1.20"
VENV_BIN_DIR: "Scripts"
- id: "ubuntu1604-64-go-1-20"
display_name: "Ubuntu 16.04"
run_on: ubuntu1604-build
variables:
GO_DIST: "/opt/golang/go1.20"
- id: "macos11-go-1-20"
display_name: "MacOS 11.0"
run_on: macos-1100
Expand All @@ -2354,9 +2352,9 @@ axes:
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
GO_DIST: "C:\\golang\\go1.20"
VENV_BIN_DIR: "Scripts"
- id: "ubuntu1804-64-go-1-20"
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-build
- id: "rhel80-64-go-1-20"
display_name: "RHEL 8.0"
run_on: rhel80-build
variables:
GO_DIST: "/opt/golang/go1.20"
- id: "macos11-go-1-20"
Expand All @@ -2366,7 +2364,6 @@ axes:
variables:
GO_DIST: "/opt/golang/go1.20"

# OCSP linux tasks need to run against this OS since stapling is disabled on Ubuntu 18.04 (SERVER-51364)
- id: ocsp-rhel-70
display_name: OS
values:
Expand All @@ -2387,11 +2384,6 @@ axes:
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
GO_DIST: "C:\\golang\\go1.20"
SKIP_ECS_AUTH_TEST: true
- id: "ubuntu1804-64-go-1-20"
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-test
variables:
GO_DIST: "/opt/golang/go1.20"
- id: "macos11-go-1-20"
display_name: "MacOS 11.0"
run_on: macos-1100
Expand All @@ -2414,9 +2406,9 @@ axes:
- id: os-serverless
display_name: OS
values:
- id: "ubuntu2204-go-1-20"
display_name: "Ubuntu 22.04"
run_on: ubuntu2204-small
- id: "rhel80-go-1-20"
display_name: "RHEL 8.0"
run_on: rhel80-small
variables:
GO_DIST: "/opt/golang/go1.20"

Expand Down Expand Up @@ -2639,7 +2631,7 @@ buildvariants:
- name: static-analysis
display_name: "Static Analysis"
run_on:
- ubuntu1804-build
- rhel80-build
expansions:
GO_DIST: "/opt/golang/go1.20"
tasks:
Expand All @@ -2648,7 +2640,7 @@ buildvariants:
- name: perf
display_name: "Performance"
run_on:
- ubuntu1804-build
- rhel80-build
expansions:
GO_DIST: "/opt/golang/go1.20"
tasks:
Expand All @@ -2657,7 +2649,7 @@ buildvariants:
- name: build-check
display_name: "Compile Only Checks"
run_on:
- ubuntu1804-test
- rhel80-test
expansions:
GO_DIST: "/opt/golang/go1.20"
tasks:
Expand All @@ -2666,7 +2658,7 @@ buildvariants:
- name: atlas-test
display_name: "Atlas test"
run_on:
- ubuntu1804-build
- rhel80-build
expansions:
GO_DIST: "/opt/golang/go1.20"
tasks:
Expand All @@ -2675,7 +2667,7 @@ buildvariants:
- name: atlas-data-lake-test
display_name: "Atlas Data Lake Test"
run_on:
- ubuntu1804-build
- rhel80-build
expansions:
GO_DIST: "/opt/golang/go1.20"
tasks:
Expand Down Expand Up @@ -2735,7 +2727,7 @@ buildvariants:
- name: ".ocsp-rsa !.ocsp-staple"

- matrix_name: "race-test"
matrix_spec: { version: ["latest"], os-ssl-40: ["ubuntu1804-64-go-1-20"] }
matrix_spec: { version: ["latest"], os-ssl-40: ["rhel80-64-go-1-20"] }
display_name: "Race Detector Test"
tasks:
- name: ".race"
Expand All @@ -2747,14 +2739,13 @@ buildvariants:
- name: ".versioned-api"

- matrix_name: "kms-tls-test"
matrix_spec: { version: ["latest"], os-ssl-40: ["ubuntu1804-64-go-1-20"] }
matrix_spec: { version: ["latest"], os-ssl-40: ["rhel80-64-go-1-20"] }
display_name: "KMS TLS ${os-ssl-40}"
tasks:
- name: ".kms-tls"

- matrix_name: "load-balancer-test"
# The LB software is only available on Ubuntu 18.04, so we don't test on all OSes.
matrix_spec: { version: ["5.0", "6.0", "7.0", "latest", "rapid"], os-ssl-40: ["ubuntu1804-64-go-1-20"] }
matrix_spec: { version: ["5.0", "6.0", "7.0", "latest", "rapid"], os-ssl-40: ["rhel80-64-go-1-20"] }
display_name: "Load Balancer Support ${version} ${os-ssl-40}"
tasks:
- name: ".load-balancer"
Expand All @@ -2766,13 +2757,13 @@ buildvariants:
- "serverless_task_group"

- matrix_name: "kms-kmip-test"
matrix_spec: { version: ["latest"], os-ssl-40: ["ubuntu1804-64-go-1-20"] }
matrix_spec: { version: ["latest"], os-ssl-40: ["rhel80-64-go-1-20"] }
display_name: "KMS KMIP ${os-ssl-40}"
tasks:
- name: ".kms-kmip"

- matrix_name: "fuzz-test"
matrix_spec: { version: ["5.0"], os-ssl-40: ["ubuntu1804-64-go-1-20"] }
matrix_spec: { version: ["5.0"], os-ssl-40: ["rhel80-64-go-1-20"] }
display_name: "Fuzz ${version} ${os-ssl-40}"
tasks:
- name: "test-fuzz"
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fi
export GOROOT="${GOROOT}"
export PATH="${GOROOT}/bin:${GCC_PATH}:$GOPATH/bin:$PATH"
export PROJECT="${project}"
export PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib/pkgconfig:$(pwd)/install/mongo-c-driver/lib/pkgconfig
export LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib
export PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib64/pkgconfig:$(pwd)/install/mongo-c-driver/lib/pkgconfig
export LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib64
export GOFLAGS=-mod=vendor

SSL=${SSL:-nossl}
Expand Down
Loading

0 comments on commit 3c4e203

Please sign in to comment.