Skip to content

Commit 5ae7bf8

Browse files
committed
fix kms_setup
1 parent b34f4a8 commit 5ae7bf8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.evergreen/scripts/setup_kms.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@
55
from utils import DRIVERS_TOOLS, LOGGER, ROOT, read_env, run_command, write_env
66

77
TMP_DRIVER_FILE = "/tmp/mongo-python-driver.tgz" # noqa: S108
8+
CSFLE_FOLDER = f"{DRIVERS_TOOLS}/.evergreen/csfle"
89

910

1011
def setup_azurekms() -> None:
1112
LOGGER.info("Copying files to Azure VM...")
1213
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"""
1415
run_command(cmd)
1516
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"""
1718
run_command(cmd)
1819
LOGGER.info("Copying files to Azure VM... done.")
1920

2021

2122
def setup_gcpkms() -> None:
2223
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"
2425
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'
2627
run_command(cmd)
2728
LOGGER.info("Copying files to GCP VM...")
2829

@@ -46,10 +47,10 @@ def setup_kms(sub_test_name: str) -> None:
4647
if sub_test_type == "azure":
4748
os.environ["AZUREKMS_VMNAME_PREFIX"] = "PYTHON_DRIVER"
4849

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")
5152
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")
5354
create_archive()
5455

5556
if sub_test_name == "azure":

0 commit comments

Comments
 (0)