Skip to content

Commit 5d2ffd2

Browse files
DmitryLukyanovBorisDog
authored andcommitted
CSHARP-4399: Remove use of activate_venv.sh and utils.sh. (mongodb#983)
1 parent 06dd566 commit 5d2ffd2

File tree

2 files changed

+49
-55
lines changed

2 files changed

+49
-55
lines changed

evergreen/evergreen.yml

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,12 @@ functions:
446446
type: test
447447
params:
448448
silent: true
449+
shell: "bash"
449450
working_dir: mongo-csharp-driver
450451
script: |
451452
${PREPARE_SHELL}
452453
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
453-
. ./activate_venv.sh
454+
. ./activate-authawsvenv.sh
454455
mongo aws_e2e_regular_aws.js
455456
- command: shell.exec
456457
type: test
@@ -470,12 +471,13 @@ functions:
470471
type: test
471472
params:
472473
silent: true
474+
shell: "bash"
473475
working_dir: mongo-csharp-driver
474476
script: |
475477
${PREPARE_SHELL}
476478
# The aws_e2e_assume_role script requires python3 with boto3.
477479
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
478-
. ./activate_venv.sh
480+
. ./activate-authawsvenv.sh
479481
mongo aws_e2e_assume_role.js
480482
- command: shell.exec
481483
type: test
@@ -501,6 +503,7 @@ functions:
501503
type: test
502504
params:
503505
silent: true
506+
shell: "bash"
504507
working_dir: mongo-csharp-driver
505508
script: |
506509
${PREPARE_SHELL}
@@ -509,7 +512,7 @@ functions:
509512
exit 0
510513
fi
511514
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
512-
. ./activate_venv.sh
515+
. ./activate-authawsvenv.sh
513516
mongo aws_e2e_ec2.js
514517
- command: shell.exec
515518
type: test
@@ -532,6 +535,7 @@ functions:
532535
type: test
533536
params:
534537
silent: true
538+
shell: "bash"
535539
working_dir: mongo-csharp-driver
536540
script: |
537541
${PREPARE_SHELL}
@@ -540,7 +544,7 @@ functions:
540544
exit 0
541545
fi
542546
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
543-
. ./activate_venv.sh
547+
. ./activate-authawsvenv.sh
544548
echo "Project Directory: $PROJECT_DIRECTORY"
545549
# SRC_DIRECTORY is workaround since EG_TOOLS expects "src" folder as a root
546550
SRC_DIRECTORY=$(dirname $PROJECT_DIRECTORY)/src
@@ -560,6 +564,7 @@ functions:
560564
- command: shell.exec
561565
type: test
562566
params:
567+
shell: "bash"
563568
working_dir: mongo-csharp-driver
564569
script: |
565570
${PREPARE_SHELL}
@@ -568,7 +573,7 @@ functions:
568573
exit 0
569574
fi
570575
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
571-
. ./activate_venv.sh
576+
. ./activate-authawsvenv.sh
572577
mongo aws_e2e_web_identity.js
573578
- command: shell.exec
574579
type: test
@@ -708,10 +713,12 @@ functions:
708713
- command: shell.exec
709714
params:
710715
background: true
716+
shell: "bash"
711717
script: |
712718
set -o xtrace
713719
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
714-
nohup ./venv/Scripts/python ocsp_mock.py \
720+
. ./activate-ocspvenv.sh
721+
nohup python ocsp_mock.py \
715722
--ca_file ${OCSP_ALGORITHM}/ca.pem \
716723
--ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \
717724
--ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \
@@ -727,10 +734,12 @@ functions:
727734
- command: shell.exec
728735
params:
729736
background: true
737+
shell: "bash"
730738
script: |
731739
set -o xtrace
732740
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
733-
nohup ./venv/Scripts/python ocsp_mock.py \
741+
. ./activate-ocspvenv.sh
742+
nohup python ocsp_mock.py \
734743
--ca_file ${OCSP_ALGORITHM}/ca.pem \
735744
--ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \
736745
--ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \
@@ -746,10 +755,12 @@ functions:
746755
- command: shell.exec
747756
params:
748757
background: true
758+
shell: "bash"
749759
script: |
750760
set -o xtrace
751761
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
752-
nohup ./venv/Scripts/python.exe ocsp_mock.py \
762+
. ./activate-ocspvenv.sh
763+
nohup python ocsp_mock.py \
753764
--ca_file ${OCSP_ALGORITHM}/ca.pem \
754765
--ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \
755766
--ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \
@@ -767,10 +778,12 @@ functions:
767778
- command: shell.exec
768779
params:
769780
background: true
781+
shell: "bash"
770782
script: |
771783
set -o xtrace
772784
cd ${DRIVERS_TOOLS}/.evergreen/ocsp
773-
nohup ./venv/Scripts/python.exe ocsp_mock.py \
785+
. ./activate-ocspvenv.sh
786+
nohup python ocsp_mock.py \
774787
--ca_file ${OCSP_ALGORITHM}/ca.pem \
775788
--ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \
776789
--ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \
@@ -848,83 +861,93 @@ functions:
848861
start-kms-mock-servers:
849862
- command: shell.exec
850863
params:
864+
shell: "bash"
851865
script: |
852866
${PREPARE_SHELL}
853867
cd ${DRIVERS_TOOLS}/.evergreen/csfle
854-
. ./activate_venv.sh
868+
. ./activate-kmstlsvenv.sh
855869
- command: shell.exec
856870
params:
857871
background: true
872+
shell: "bash"
858873
script: |
859874
#expired client cert
860-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
861875
cd ${DRIVERS_TOOLS}/.evergreen/csfle
862-
$PYTHON -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000
876+
. ./activate-kmstlsvenv.sh
877+
python -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000
863878
- command: shell.exec
864879
params:
865880
background: true
881+
shell: "bash"
866882
script: |
867883
#wrong-host client cert
868-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
869884
cd ${DRIVERS_TOOLS}/.evergreen/csfle
870-
$PYTHON -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/wrong-host.pem --port 8001
885+
. ./activate-kmstlsvenv.sh
886+
python -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/wrong-host.pem --port 8001
871887
- command: shell.exec
872888
params:
873889
background: true
890+
shell: "bash"
874891
script: |
875892
#server.pem client cert
876-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
877893
cd ${DRIVERS_TOOLS}/.evergreen/csfle
878-
$PYTHON -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/server.pem --port 8002 --require_client_cert
894+
. ./activate-kmstlsvenv.sh
895+
python -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/server.pem --port 8002 --require_client_cert
879896
880897
start-kms-mock-kmip-server:
881898
- command: shell.exec
882899
params:
900+
shell: "bash"
883901
script: |
884902
${PREPARE_SHELL}
885903
cd ${DRIVERS_TOOLS}/.evergreen/csfle
886-
. ./activate_venv.sh
904+
. ./activate-kmstlsvenv.sh
887905
- command: shell.exec
888906
params:
907+
shell: "bash"
889908
background: true
890909
script: |
891-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
892910
cd ${DRIVERS_TOOLS}/.evergreen/csfle
893-
$PYTHON -u kms_kmip_server.py
911+
. ./activate-kmstlsvenv.sh
912+
python -u kms_kmip_server.py
894913
895914
start-kms-mock-gcp-server:
896915
- command: shell.exec
897916
params:
917+
shell: "bash"
898918
script: |
899919
${PREPARE_SHELL}
900920
cd ${DRIVERS_TOOLS}/.evergreen/csfle
901-
. ./activate_venv.sh
921+
. ./activate-kmstlsvenv.sh
902922
- command: shell.exec
903923
params:
904924
background: true
925+
shell: "bash"
905926
script: |
906-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
907927
cd ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms
908-
$PYTHON -m pip install PyJWT
928+
. ./activate-kmstlsvenv.sh
929+
python -m pip install PyJWT
909930
mkdir ${DRIVERS_TOOLS}/tmp
910931
echo '${GOOGLE_APPLICATION_CREDENTIALS_CONTENT}' > ${DRIVERS_TOOLS}/tmp/testgcpkms_key_file.json
911932
export GOOGLE_APPLICATION_CREDENTIALS=${DRIVERS_TOOLS}/tmp/testgcpkms_key_file.json
912-
$PYTHON -u mock_server.py
933+
python -u mock_server.py
913934
914935
start-kms-mock-azure-imds-server:
915936
- command: shell.exec
916937
params:
938+
shell: "bash"
917939
script: |
918940
${PREPARE_SHELL}
919941
cd ${DRIVERS_TOOLS}/.evergreen/csfle
920-
. ./activate_venv.sh
942+
. ./activate-kmstlsvenv.sh
921943
- command: shell.exec
922944
params:
923945
background: true
946+
shell: "bash"
924947
script: |
925-
PYTHON=$(Venv="${DRIVERS_TOOLS}/.evergreen/csfle/kmstlsvenv" OS=${OS} ${PROJECT_DIRECTORY}/evergreen/get-python-path.sh);
926948
cd ${DRIVERS_TOOLS}/.evergreen/csfle
927-
$PYTHON bottle.py fake_azure:imds
949+
. ./activate-kmstlsvenv.sh
950+
python bottle.py fake_azure:imds
928951
929952
cleanup:
930953
- command: shell.exec

evergreen/get-python-path.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)