@@ -1035,6 +1035,43 @@ task_groups:
10351035 tasks :
10361036 - " .serverless"
10371037
1038+ - name : testgcpkms_task_group
1039+ setup_group_can_fail_task : true
1040+ setup_group_timeout_secs : 1800 # 30 minutes
1041+ setup_group :
1042+ - func : fetch source
1043+ - func : prepare resources
1044+ - func : fix absolute paths
1045+ - func : make files executable
1046+ - command : shell.exec
1047+ params :
1048+ shell : " bash"
1049+ script : |
1050+ ${PREPARE_SHELL}
1051+ echo '${testgcpkms_key_file}' > /tmp/testgcpkms_key_file.json
1052+ export GCPKMS_KEYFILE=/tmp/testgcpkms_key_file.json
1053+ export GCPKMS_DRIVERS_TOOLS=$DRIVERS_TOOLS
1054+ export GCPKMS_SERVICEACCOUNT="${testgcpkms_service_account}"
1055+ export GCPKMS_MACHINETYPE="e2-standard-4"
1056+ $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/create-and-setup-instance.sh
1057+ # Load the GCPKMS_GCLOUD, GCPKMS_INSTANCE, GCPKMS_REGION, and GCPKMS_ZONE expansions.
1058+ - command : expansions.update
1059+ params :
1060+ file : testgcpkms-expansions.yml
1061+ teardown_group :
1062+ - command : shell.exec
1063+ params :
1064+ shell : " bash"
1065+ script : |
1066+ ${PREPARE_SHELL}
1067+ export GCPKMS_GCLOUD=${GCPKMS_GCLOUD}
1068+ export GCPKMS_PROJECT=${GCPKMS_PROJECT}
1069+ export GCPKMS_ZONE=${GCPKMS_ZONE}
1070+ export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
1071+ $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/delete-instance.sh
1072+ tasks :
1073+ - testgcpkms-task
1074+
10381075tasks :
10391076 # Wildcard task. Do you need to find out what tools are available and where?
10401077 # Throw it here, and execute this task on all buildvariants
@@ -1857,6 +1894,51 @@ tasks:
18571894 commands :
18581895 - func : " download and merge coverage"
18591896
1897+ - name : " testgcpkms-task"
1898+ commands :
1899+ - command : shell.exec
1900+ type : setup
1901+ params :
1902+ working_dir : " src"
1903+ shell : " bash"
1904+ script : |
1905+ ${PREPARE_SHELL}
1906+ echo "Copying files ... begin"
1907+ export GCPKMS_GCLOUD=${GCPKMS_GCLOUD}
1908+ export GCPKMS_PROJECT=${GCPKMS_PROJECT}
1909+ export GCPKMS_ZONE=${GCPKMS_ZONE}
1910+ export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
1911+ tar czf /tmp/mongo-python-driver.tgz .
1912+ GCPKMS_SRC=/tmp/mongo-python-driver.tgz GCPKMS_DST=$GCPKMS_INSTANCENAME: $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/copy-file.sh
1913+ echo "Copying files ... end"
1914+ echo "Untarring file ... begin"
1915+ GCPKMS_CMD="tar xf mongo-python-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
1916+ echo "Untarring file ... end"
1917+ - command : shell.exec
1918+ type : test
1919+ params :
1920+ working_dir : " src"
1921+ shell : " bash"
1922+ script : |
1923+ ${PREPARE_SHELL}
1924+ export GCPKMS_GCLOUD=${GCPKMS_GCLOUD}
1925+ export GCPKMS_PROJECT=${GCPKMS_PROJECT}
1926+ export GCPKMS_ZONE=${GCPKMS_ZONE}
1927+ export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
1928+ GCPKMS_CMD="SUCCESS=true ./.evergreen/run-mongodb-fle-gcp-auto.sh mongodb://localhost:27017" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
1929+
1930+ - name : " testgcpkms-fail-task"
1931+ # testgcpkms-fail-task runs in a non-GCE environment.
1932+ # It is expected to fail to obtain GCE credentials.
1933+ commands :
1934+ - command : shell.exec
1935+ type : test
1936+ params :
1937+ working_dir : " src"
1938+ shell : " bash"
1939+ script : |
1940+ ${PREPARE_SHELL}
1941+ SUCCESS=false ./.evergreen/run-mongodb-fle-gcp-auto.sh mongodb://localhost:27017
18601942
18611943axes :
18621944 # Choice of distro
@@ -2821,6 +2903,15 @@ buildvariants:
28212903 tasks :
28222904 - name : " load-balancer-test"
28232905
2906+ - name : testgcpkms-variant
2907+ display_name : " GCP KMS"
2908+ run_on :
2909+ - debian11-small
2910+ tasks :
2911+ - name : testgcpkms_task_group
2912+ batchtime : 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
2913+ - testgcpkms-fail-task
2914+
28242915- name : Release
28252916 display_name : Release
28262917 batchtime : 20160 # 14 days
0 commit comments