Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
aa44ef7
Pushed PREPARE_SHELL creation into an env.sh file
Jibola Aug 12, 2024
f3a479c
push env.sh into scripts folder
Jibola Aug 12, 2024
0d80367
run in scripts/env.sh
Jibola Aug 12, 2024
8fcc5ac
set configure-env.sh into the scripts path
Jibola Aug 12, 2024
cf7a58e
Added safeguard to check if env.sh file already created
Jibola Aug 12, 2024
5568856
fix .sh
Jibola Aug 12, 2024
fe6932a
removed mkdir scripts call
Jibola Aug 12, 2024
88029d4
check env.sh save region
Jibola Aug 12, 2024
ac46e2b
added more spot debugging
Jibola Aug 13, 2024
94661f8
find scripts in evergreen
Jibola Aug 14, 2024
c7ff988
adjust sourcing based on working_dir
Jibola Aug 14, 2024
7d56822
remove the failing ls calls
Jibola Aug 14, 2024
13c1886
fix the export logic
Jibola Aug 14, 2024
177e6d2
Have prepare resources called without working_dir specified
Jibola Aug 14, 2024
6664e40
remove all expansions created from the expansions.yml update
Jibola Aug 14, 2024
7a6298d
remove calls to include_expansions_to_env and use shell until subproc…
Jibola Aug 14, 2024
34e76c4
fix yml config
Jibola Aug 14, 2024
ebdd27a
remove almost all subprocess calls
Jibola Aug 14, 2024
8d08d5b
Merge branch 'master' into PYTHON-4631
Jibola Aug 19, 2024
105035c
fix shellcheck issues
Jibola Aug 19, 2024
8c9259d
add DRIVERS_TOOLS and PROJECT_DIRECTORY to expansions
Jibola Aug 21, 2024
7c14306
replace env variable usage with expansion usage
Jibola Aug 21, 2024
f367150
fix system failures
Jibola Aug 22, 2024
a624d0d
fix aws lambda
Jibola Aug 22, 2024
c48dbeb
Merge branch 'master' into PYTHON-4631
Jibola Aug 28, 2024
ef5a7fd
->
Jibola Aug 28, 2024
215e1ff
->
Jibola Aug 28, 2024
b004804
convert some tests back to using subprocess
Jibola Aug 29, 2024
24632e1
convert azurekms tests to subprocess
Jibola Aug 29, 2024
67abf6e
convert another to subprocess
Jibola Aug 29, 2024
86a8af7
Applied Code Review Suggestions and Made sure to only replace `${PREP…
Jibola Aug 30, 2024
cd59510
remove braces on DRIVERS_TOOLS in prepare resources
Jibola Aug 30, 2024
d948fc7
return DRIVERS_TOOLS expansion to run-gcpkms-test
Jibola Aug 30, 2024
27b8ceb
Revert removal of "include_expansion_in_env" for DRIVERS_TOOLS
Jibola Sep 3, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
run in scripts/env.sh
  • Loading branch information
Jibola committed Aug 12, 2024
commit 0d803677fdd24dba367b942800f0697c7e7810ab
80 changes: 40 additions & 40 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
rm -rf $DRIVERS_TOOLS
if [ "${project}" = "drivers-tools" ]; then
Expand Down Expand Up @@ -91,7 +91,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
bash .evergreen/combine-coverage.sh
# Upload the resulting html coverage report.
- command: shell.exec
Expand Down Expand Up @@ -122,7 +122,7 @@ functions:
- command: shell.exec
params:
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
mkdir out_dir
find $MONGO_ORCHESTRATION_HOME -name \*.log -exec sh -c 'x="{}"; mv $x $PWD/out_dir/$(basename $(dirname $x))_$(basename $x)' \;
Expand Down Expand Up @@ -224,7 +224,7 @@ functions:
- command: shell.exec
params:
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace

# Enable core dumps if enabled on the machine
Expand Down Expand Up @@ -283,13 +283,13 @@ functions:
type: setup
params:
script: |
. env.sh
. .evergreen/scripts/env.sh
bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
- command: shell.exec
type: setup
params:
script: |
. env.sh
. .evergreen/scripts/env.sh
bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
sleep 1
docker ps
Expand All @@ -298,7 +298,7 @@ functions:
- command: shell.exec
params:
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh

Expand All @@ -308,7 +308,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
PYTHON_BINARY=${PYTHON_BINARY} MOD_WSGI_VERSION=${MOD_WSGI_VERSION} \
MOD_WSGI_EMBEDDED=${MOD_WSGI_EMBEDDED} PROJECT_DIRECTORY=${PROJECT_DIRECTORY} \
Expand All @@ -320,7 +320,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
export PYTHON_BINARY=${PYTHON_BINARY}
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-mockupdb
Expand All @@ -331,7 +331,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
PYTHON_BINARY=${PYTHON_BINARY} bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh doctest:test

Expand All @@ -343,7 +343,7 @@ functions:
background: true
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
script: |
. env.sh
. .evergreen/scripts/env.sh
if [ -n "${test_encryption}" ]; then
./.evergreen/hatch.sh encryption:setup
fi
Expand All @@ -356,7 +356,7 @@ functions:
script: |
# Disable xtrace
set +x
. env.sh
. .evergreen/scripts/env.sh
if [ -n "${MONGODB_STARTED}" ]; then
export PYMONGO_MUST_CONNECT=true
fi
Expand Down Expand Up @@ -453,7 +453,7 @@ functions:
shell: "bash"
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
.evergreen/run-mongodb-aws-test.sh regular

"run aws auth test with assume role credentials":
Expand All @@ -463,7 +463,7 @@ functions:
shell: "bash"
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
.evergreen/run-mongodb-aws-test.sh assume-role

"run aws auth test with aws EC2 credentials":
Expand All @@ -477,7 +477,7 @@ functions:
echo "This platform does not support the EC2 auth test, skipping..."
exit 0
fi
. env.sh
. .evergreen/scripts/env.sh
.evergreen/run-mongodb-aws-test.sh ec2

"run aws auth test with aws web identity credentials":
Expand All @@ -491,7 +491,7 @@ functions:
echo "This platform does not support the web identity auth test, skipping..."
exit 0
fi
. env.sh
. .evergreen/scripts/env.sh
# Test with and without AWS_ROLE_SESSION_NAME set.
.evergreen/run-mongodb-aws-test.sh web-identity
AWS_ROLE_SESSION_NAME="test" \
Expand All @@ -514,7 +514,7 @@ functions:
working_dir: "src"
shell: bash
script: |
. env.sh
. .evergreen/scripts/env.sh
.evergreen/run-mongodb-aws-test.sh env-creds

"run aws auth test with aws credentials and session token as environment variables":
Expand All @@ -524,7 +524,7 @@ functions:
working_dir: "src"
shell: bash
script: |
. env.sh
. .evergreen/scripts/env.sh
.evergreen/run-mongodb-aws-test.sh session-creds

"run aws ECS auth test":
Expand All @@ -538,7 +538,7 @@ functions:
echo "This platform does not support the ECS auth test, skipping..."
exit 0
fi
. env.sh
. .evergreen/scripts/env.sh
set -ex
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
. ./activate-authawsvenv.sh
Expand All @@ -553,7 +553,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
. .evergreen/hatch.sh encryption:teardown
rm -rf $DRIVERS_TOOLS || true
rm -f ./secrets-export.sh || true
Expand All @@ -563,7 +563,7 @@ functions:
params:
script: |
set +x
. env.sh
. .evergreen/scripts/env.sh
for filename in $(find ${DRIVERS_TOOLS} -name \*.json); do
perl -p -i -e "s|ABSOLUTE_PATH_REPLACEMENT_TOKEN|${DRIVERS_TOOLS}|g" $filename
done
Expand All @@ -573,7 +573,7 @@ functions:
params:
script: |
set +x
. env.sh
. .evergreen/scripts/env.sh
for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
cat $i | tr -d '\r' > $i.new
mv $i.new $i
Expand All @@ -586,7 +586,7 @@ functions:
params:
script: |
set +x
. env.sh
. .evergreen/scripts/env.sh
for i in $(find ${DRIVERS_TOOLS}/.evergreen ${PROJECT_DIRECTORY}/.evergreen -name \*.sh); do
chmod +x $i
done
Expand All @@ -596,15 +596,15 @@ functions:
params:
script: |
set +x
. env.sh
. .evergreen/scripts/env.sh
echo '{"results": [{ "status": "FAIL", "test_file": "Build", "log_raw": "No test-results.json found was created" } ]}' > ${PROJECT_DIRECTORY}/test-results.json

"install dependencies":
- command: shell.exec
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
file="${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh"
# Don't use ${file} syntax here because evergreen treats it as an empty expansion.
Expand Down Expand Up @@ -635,7 +635,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
TEST_OCSP=1 \
PYTHON_BINARY=${PYTHON_BINARY} \
CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/${OCSP_ALGORITHM}/ca.pem" \
Expand All @@ -647,7 +647,7 @@ functions:
params:
background: true
script: |
. env.sh
. .evergreen/scripts/env.sh
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
. ./activate-ocspvenv.sh
python ocsp_mock.py \
Expand All @@ -660,7 +660,7 @@ functions:
params:
background: true
script: |
. env.sh
. .evergreen/scripts/env.sh
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
. ./activate-ocspvenv.sh
python ocsp_mock.py \
Expand All @@ -675,7 +675,7 @@ functions:
params:
background: true
script: |
. env.sh
. .evergreen/scripts/env.sh
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
. ./activate-ocspvenv.sh
python ocsp_mock.py \
Expand All @@ -688,7 +688,7 @@ functions:
params:
background: true
script: |
. env.sh
. .evergreen/scripts/env.sh
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
. ./activate-ocspvenv.sh
python ocsp_mock.py \
Expand Down Expand Up @@ -730,7 +730,7 @@ functions:
params:
shell: "bash"
script: |
. env.sh
. .evergreen/scripts/env.sh
cd "${DRIVERS_TOOLS}/.evergreen/auth_aws"
if [ -f "./aws_e2e_setup.json" ]; then
. ./activate-authawsvenv.sh
Expand All @@ -750,7 +750,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
VERSION=${VERSION} ENSURE_UNIVERSAL2=${ENSURE_UNIVERSAL2} .evergreen/release.sh

Expand Down Expand Up @@ -791,7 +791,7 @@ functions:
params:
shell: "bash"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
# Combine releases into one directory.
ls -la release/
Expand Down Expand Up @@ -836,7 +836,7 @@ functions:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
PROJECT_DIRECTORY=${PROJECT_DIRECTORY} bash ${PROJECT_DIRECTORY}/.evergreen/run-perf-tests.sh

"attach benchmark test results":
Expand Down Expand Up @@ -1125,7 +1125,7 @@ tasks:
params:
working_dir: "src"
script: |
. env.sh
. .evergreen/scripts/env.sh
set -o xtrace
.evergreen/build-manylinux.sh BUILD_WITH_TAG
- func: "upload release"
Expand Down Expand Up @@ -1997,7 +1997,7 @@ tasks:
shell: bash
script: |-
set -o errexit
. env.sh
. .evergreen/scripts/env.sh
cd src
git add .
git commit -m "add files"
Expand All @@ -2014,7 +2014,7 @@ tasks:
shell: bash
script: |-
set -o errexit
. env.sh
. .evergreen/scripts/env.sh
cd src
git add .
git commit -m "add files"
Expand Down Expand Up @@ -2082,7 +2082,7 @@ tasks:
working_dir: "src"
shell: "bash"
script: |
. env.sh
. .evergreen/scripts/env.sh
export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/${bucket_name}/libmongocrypt/debian10/master/latest/libmongocrypt.tar.gz
SUCCESS=false TEST_FLE_GCP_AUTO=1 ./.evergreen/hatch.sh test:test-eg
Expand Down Expand Up @@ -2147,7 +2147,7 @@ tasks:
shell: "bash"
working_dir: src
script: |
. env.sh
. .evergreen/scripts/env.sh
set -x
export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh"
Expand All @@ -2163,7 +2163,7 @@ tasks:
shell: "bash"
working_dir: src
script: |
. env.sh
. .evergreen/scripts/env.sh
set -x
export BASE_SHA=${revision}
export HEAD_SHA=${github_commit}
Expand Down