Skip to content

Commit 8e989d4

Browse files
committed
Evergreen: Ensure consistent use of python
Updated to use: - activate-kmstlsvenv.sh - activate-authawsvenv.sh - activate-ocsp.sh Update any paths to python for the virtualenv version. JAVA-4806
1 parent e40dca5 commit 8e989d4

File tree

1 file changed

+40
-45
lines changed

1 file changed

+40
-45
lines changed

.evergreen/.evg.yml

Lines changed: 40 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ functions:
9696
# If this was a patch build, doing a fresh clone would not actually test the patch
9797
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
9898
else
99-
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
99+
git clone https://github.com/rozza/drivers-evergreen-tools.git $DRIVERS_TOOLS
100100
fi
101101
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
102102
@@ -353,10 +353,11 @@ functions:
353353
type: test
354354
params:
355355
working_dir: "src"
356+
shell: "bash"
356357
script: |
357358
${PREPARE_SHELL}
358359
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
359-
. ./activate_venv.sh
360+
. ./activate-authawsvenv.sh
360361
mongo aws_e2e_regular_aws.js
361362
- command: shell.exec
362363
type: test
@@ -379,10 +380,11 @@ functions:
379380
type: test
380381
params:
381382
working_dir: "src"
383+
shell: "bash"
382384
script: |
383385
${PREPARE_SHELL}
384386
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
385-
. ./activate_venv.sh
387+
. ./activate-authawsvenv.sh
386388
mongo aws_e2e_assume_role.js
387389
- command: shell.exec
388390
type: test
@@ -410,15 +412,17 @@ functions:
410412
type: test
411413
params:
412414
working_dir: "src"
415+
shell: "bash"
413416
script: |
414417
${PREPARE_SHELL}
415418
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
416-
. ./activate_venv.sh
419+
. ./activate-authawsvenv.sh
417420
mongo aws_e2e_ec2.js
418421
- command: shell.exec
419422
type: test
420423
params:
421424
working_dir: "src"
425+
shell: "bash"
422426
script: |
423427
${PREPARE_SHELL}
424428
# Write an empty prepare_mongodb_aws so no auth environment variables are set.
@@ -430,10 +434,11 @@ functions:
430434
type: test
431435
params:
432436
working_dir: "src"
437+
shell: "bash"
433438
script: |
434439
${PREPARE_SHELL}
435440
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
436-
. ./activate_venv.sh
441+
. ./activate-authawsvenv.sh
437442
mongo aws_e2e_regular_aws.js
438443
- command: shell.exec
439444
type: test
@@ -459,10 +464,11 @@ functions:
459464
type: test
460465
params:
461466
working_dir: "src"
467+
shell: "bash"
462468
script: |
463469
${PREPARE_SHELL}
464470
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
465-
. ./activate_venv.sh
471+
. ./activate-authawsvenv.sh
466472
mongo aws_e2e_assume_role.js
467473
- command: shell.exec
468474
type: test
@@ -489,10 +495,11 @@ functions:
489495
type: test
490496
params:
491497
working_dir: "src"
498+
shell: "bash"
492499
script: |
493500
${PREPARE_SHELL}
494501
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
495-
. ./activate_venv.sh
502+
. ./activate-authawsvenv.sh
496503
cat <<EOF > setup.js
497504
const mongo_binaries = "$MONGODB_BINARIES";
498505
const project_dir = "$PROJECT_DIRECTORY";
@@ -526,43 +533,37 @@ functions:
526533
working_dir: "src"
527534
script: |
528535
${PREPARE_SHELL}
529-
CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/${OCSP_ALGORITHM}/ca.pem" \
536+
CA_FILE="${DRIVERS_TOOLS}/.evergreen/ocsp/${OCSP_ALGORITHM}/ca.pem" \
530537
OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \
531538
OCSP_MUST_STAPLE="${OCSP_MUST_STAPLE}" \
532539
JAVA_VERSION="${JAVA_VERSION}" \
533540
sh ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-test.sh
534541
535542
"run-valid-ocsp-server-ca-responder":
536-
- command: shell.exec
537-
params:
538-
script: |
539-
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
540-
/opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv
541-
./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
542543
- command: shell.exec
543544
params:
544545
background: true
546+
shell: "bash"
545547
script: |
548+
${PREPARE_SHELL}
546549
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
547-
nohup ./venv/bin/python3 ocsp_mock.py \
550+
. ./activate-ocspvenv.sh
551+
nohup python ocsp_mock.py \
548552
--ca_file ${OCSP_ALGORITHM}/ca.pem \
549553
--ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \
550554
--ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \
551555
-p 8100 -v
552556
553557
"run-revoked-ocsp-server-ca-responder":
554-
- command: shell.exec
555-
params:
556-
script: |
557-
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
558-
/opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv
559-
./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
560558
- command: shell.exec
561559
params:
562560
background: true
561+
shell: "bash"
563562
script: |
563+
${PREPARE_SHELL}
564564
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
565-
nohup ./venv/bin/python3 ocsp_mock.py \
565+
. ./activate-ocspvenv.sh
566+
nohup python ocsp_mock.py \
566567
--ca_file ${OCSP_ALGORITHM}/ca.pem \
567568
--ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \
568569
--ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \
@@ -571,36 +572,30 @@ functions:
571572
--fault revoked
572573
573574
"run-valid-ocsp-server-delegate-responder":
574-
- command: shell.exec
575-
params:
576-
script: |
577-
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
578-
/opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv
579-
./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
580575
- command: shell.exec
581576
params:
582577
background: true
578+
shell: "bash"
583579
script: |
580+
${PREPARE_SHELL}
584581
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
585-
nohup ./venv/bin/python3 ocsp_mock.py \
582+
. ./activate-ocspvenv.sh
583+
nohup python ocsp_mock.py \
586584
--ca_file ${OCSP_ALGORITHM}/ca.pem \
587585
--ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \
588586
--ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \
589587
-p 8100 -v
590588
591589
"run-revoked-ocsp-server-delegate-responder":
592-
- command: shell.exec
593-
params:
594-
script: |
595-
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
596-
/opt/mongodbtoolchain/v3/bin/python3 -m venv ./venv
597-
./venv/bin/pip3 install -r ${DRIVERS_TOOLS}/.evergreen/ocsp/mock-ocsp-responder-requirements.txt
598590
- command: shell.exec
599591
params:
600592
background: true
593+
shell: "bash"
601594
script: |
595+
${PREPARE_SHELL}
602596
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
603-
nohup ./venv/bin/python3 ocsp_mock.py \
597+
. ./activate-ocspvenv.sh
598+
nohup python ocsp_mock.py \
604599
--ca_file ${OCSP_ALGORITHM}/ca.pem \
605600
--ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \
606601
--ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \
@@ -645,32 +640,32 @@ functions:
645640
.evergreen/run-connectivity-tests.sh
646641
647642
start-kms-mock-server:
648-
- command: shell.exec
649-
params:
650-
script: |
651-
${PREPARE_SHELL}
652-
cd ${DRIVERS_TOOLS}/.evergreen/csfle
653-
. ./activate_venv.sh
654643
- command: shell.exec
655644
params:
656645
background: true
646+
shell: "bash"
657647
script: |
648+
${PREPARE_SHELL}
658649
cd ${DRIVERS_TOOLS}/.evergreen/csfle
659-
./kmstlsvenv/bin/python3 -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/${CERT_FILE} --port 8000
650+
. ./activate-kmstlsvenv.sh
651+
python -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/${CERT_FILE} --port 8000
660652
661653
start-kms-kmip-server:
662654
- command: shell.exec
663655
params:
656+
shell: "bash"
664657
script: |
665658
${PREPARE_SHELL}
666659
cd ${DRIVERS_TOOLS}/.evergreen/csfle
667-
. ./activate_venv.sh
660+
. ./activate-kmstlsvenv.sh
668661
- command: shell.exec
669662
params:
663+
shell: "bash"
670664
background: true
671665
script: |
672666
cd ${DRIVERS_TOOLS}/.evergreen/csfle
673-
./kmstlsvenv/bin/python3 -u kms_kmip_server.py
667+
. ./activate-kmstlsvenv.sh
668+
python -u kms_kmip_server.py
674669
675670
"run-kms-tls-test":
676671
- command: shell.exec

0 commit comments

Comments
 (0)