5
5
from utils import DRIVERS_TOOLS , LOGGER , ROOT , read_env , run_command , write_env
6
6
7
7
TMP_DRIVER_FILE = "/tmp/mongo-python-driver.tgz" # noqa: S108
8
+ CSFLE_FOLDER = f"{ DRIVERS_TOOLS } /.evergreen/csfle"
8
9
9
10
10
11
def setup_azurekms () -> None :
11
12
LOGGER .info ("Copying files to Azure VM..." )
12
13
cmd = f"""AZUREKMS_SRC="{ TMP_DRIVER_FILE } " AZUREKMS_DST="~/" \
13
- { DRIVERS_TOOLS } /.evergreen/csfle /azurekms/copy-file.sh"""
14
+ { CSFLE_FOLDER } /azurekms/copy-file.sh"""
14
15
run_command (cmd )
15
16
cmd = """AZUREKMS_CMD="tar xf mongo-python-driver.tgz" \
16
- {DRIVERS_TOOLS}/.evergreen/csfle /azurekms/run-command.sh"""
17
+ {CSFLE_FOLDER} /azurekms/run-command.sh"""
17
18
run_command (cmd )
18
19
LOGGER .info ("Copying files to Azure VM... done." )
19
20
20
21
21
22
def setup_gcpkms () -> None :
22
23
LOGGER .info ("Copying files to GCP VM..." )
23
- cmd = f"GCPKMS_SRC={ TMP_DRIVER_FILE } GCPKMS_DST=$GCPKMS_INSTANCENAME: { DRIVERS_TOOLS } /.evergreen/csfle /gcpkms/copy-file.sh"
24
+ cmd = f"GCPKMS_SRC={ TMP_DRIVER_FILE } GCPKMS_DST=$GCPKMS_INSTANCENAME: { CSFLE_FOLDER } /gcpkms/copy-file.sh"
24
25
run_command (cmd )
25
- cmd = f'GCPKMS_CMD="tar xf mongo-python-driver.tgz" { DRIVERS_TOOLS } /.evergreen/csfle /gcpkms/run-command.sh'
26
+ cmd = f'GCPKMS_CMD="tar xf mongo-python-driver.tgz" { CSFLE_FOLDER } /gcpkms/run-command.sh'
26
27
run_command (cmd )
27
28
LOGGER .info ("Copying files to GCP VM..." )
28
29
@@ -46,10 +47,10 @@ def setup_kms(sub_test_name: str) -> None:
46
47
if sub_test_type == "azure" :
47
48
os .environ ["AZUREKMS_VMNAME_PREFIX" ] = "PYTHON_DRIVER"
48
49
49
- run_command (f"{ DRIVERS_TOOLS } /.evergreen/csfle /{ sub_test_type } kms/setup-secrets.sh" )
50
- config = read_env (f"{ DRIVERS_TOOLS } /csfle /{ sub_test_type } kms/secrets-export.sh" )
50
+ run_command (f"{ CSFLE_FOLDER } /{ sub_test_type } kms/setup-secrets.sh" )
51
+ config = read_env (f"{ CSFLE_FOLDER } /{ sub_test_type } kms/secrets-export.sh" )
51
52
if success :
52
- run_command (f"{ DRIVERS_TOOLS } /.evergreen/csfle /{ sub_test_type } kms/setup.sh" )
53
+ run_command (f"{ CSFLE_FOLDER } /{ sub_test_type } kms/setup.sh" )
53
54
create_archive ()
54
55
55
56
if sub_test_name == "azure" :
0 commit comments