@@ -26,6 +26,11 @@ timeout:
2626 script : |
2727 ls -la
2828functions :
29+ assume-test-secrets-ec2-role :
30+ - command : ec2.assume_role
31+ params :
32+ role_arn : ${aws_test_secrets_role}
33+
2934 fetch-source :
3035 # Executes clone and applies the submitted patch, if any
3136 - command : git.get_project
@@ -233,9 +238,13 @@ functions:
233238 display_name : " test_suite.tgz"
234239
235240 bootstrap-mongohoused :
241+ - command : ec2.assume_role
242+ params :
243+ role_arn : ${aws_test_secrets_role}
236244 - command : subprocess.exec
237245 params :
238246 binary : " bash"
247+ add_expansions_to_env : true
239248 args :
240249 - ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
241250 - command : subprocess.exec
@@ -580,16 +589,6 @@ functions:
580589 MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
581590 make evg-test-load-balancers
582591
583- run-serverless-tests :
584- - command : shell.exec
585- type : test
586- params :
587- shell : " bash"
588- working_dir : src/go.mongodb.org/mongo-driver
589- script : |
590- ${PREPARE_SHELL}
591- bash etc/run-serverless-test.sh
592-
593592 run-atlas-data-lake-test :
594593 - command : shell.exec
595594 type : test
@@ -1830,14 +1829,6 @@ tasks:
18301829 AUTH : " noauth"
18311830 SSL : " nossl"
18321831
1833- - name : " test-serverless"
1834- tags : ["serverless"]
1835- commands :
1836- - func : start-cse-servers
1837- - func : " run-serverless-tests"
1838- vars :
1839- MONGO_GO_DRIVER_COMPRESSOR : " snappy"
1840-
18411832 - name : " testgcpkms-task"
18421833 commands :
18431834 - command : shell.exec
@@ -1896,10 +1887,12 @@ tasks:
18961887
18971888 - name : " testawskms-task"
18981889 commands :
1890+ - func : assume-test-secrets-ec2-role
18991891 - command : shell.exec
19001892 type : test
19011893 params :
19021894 shell : " bash"
1895+ add_expansions_to_env : true
19031896 working_dir : src/go.mongodb.org/mongo-driver
19041897 script : |
19051898 ${PREPARE_SHELL}
@@ -1909,10 +1902,12 @@ tasks:
19091902 # testawskms-fail-task runs without environment variables.
19101903 # It is expected to fail to obtain credentials.
19111904 commands :
1905+ - func : assume-test-secrets-ec2-role
19121906 - command : shell.exec
19131907 type : test
19141908 params :
19151909 shell : " bash"
1910+ add_expansions_to_env : true
19161911 working_dir : src/go.mongodb.org/mongo-driver
19171912 script : |
19181913 ${PREPARE_SHELL}
@@ -1925,6 +1920,7 @@ tasks:
19251920 type : test
19261921 params :
19271922 shell : " bash"
1923+ add_expansions_to_env : true
19281924 working_dir : src/go.mongodb.org/mongo-driver
19291925 script : |
19301926 ${PREPARE_SHELL}
@@ -1957,10 +1953,12 @@ tasks:
19571953 # testazurekms-fail-task runs without environment variables.
19581954 # It is expected to fail to obtain credentials.
19591955 commands :
1956+ - func : assume-test-secrets-ec2-role
19601957 - command : shell.exec
19611958 type : test
19621959 params :
19631960 shell : " bash"
1961+ add_expansions_to_env : true
19641962 working_dir : src/go.mongodb.org/mongo-driver
19651963 script : |
19661964 ${PREPARE_SHELL}
@@ -2219,73 +2217,7 @@ axes:
22192217 variables :
22202218 GO_DIST : " /opt/golang/go1.22"
22212219
2222- - id : os-serverless
2223- display_name : OS
2224- values :
2225- - id : " rhel87"
2226- display_name : " RHEL 8.7"
2227- run_on : rhel8.7-small
2228- variables :
2229- GO_DIST : " /opt/golang/go1.22"
2230-
22312220task_groups :
2232- - name : serverless_task_group
2233- setup_group_can_fail_task : true
2234- setup_group_timeout_secs : 1800 # 30 minutes
2235- setup_group :
2236- - func : fetch-source
2237- - func : prepare-resources
2238- - func : fix-absolute-paths
2239- - func : make-files-executable
2240- - func : start-cse-servers
2241- - command : shell.exec
2242- params :
2243- shell : " bash"
2244- script : |
2245- ${PREPARE_SHELL}
2246- bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh ${VAULT_NAME}
2247- bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
2248- - command : expansions.update
2249- params :
2250- file : serverless-expansion.yml
2251- - command : shell.exec
2252- params :
2253- shell : " bash"
2254- script : |
2255- ${PREPARE_SHELL}
2256-
2257- # Find the crypt_shared library file in the current directory and set the CRYPT_SHARED_LIB_PATH to
2258- # the path of that file. Only look for .so, .dll, or .dylib files to prevent matching any other
2259- # downloaded files.
2260- CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \
2261- -name 'mongo_crypt_v1.so' -o \
2262- -name 'mongo_crypt_v1.dll' -o \
2263- -name 'mongo_crypt_v1.dylib')"
2264-
2265- # If we're on Windows, convert the "cygdrive" path to Windows-style paths.
2266- if [ "Windows_NT" = "$OS" ]; then
2267- CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH)
2268- fi
2269-
2270- echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" >> crypt-expansion.yml
2271-
2272- # Load the expansion file to make an evergreen variable with the current unique version
2273- - command : expansions.update
2274- params :
2275- file : crypt-expansion.yml
2276-
2277- teardown_group :
2278- - command : shell.exec
2279- params :
2280- shell : " bash"
2281- script : |
2282- ${PREPARE_SHELL}
2283- bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh ${VAULT_NAME}
2284- - func : handle-test-artifacts
2285- - func : cleanup
2286- tasks :
2287- - " .serverless"
2288-
22892221 - name : testgcpkms_task_group
22902222 setup_group_can_fail_task : true
22912223 setup_group_timeout_secs : 1800 # 30 minutes
@@ -2294,9 +2226,11 @@ task_groups:
22942226 - func : prepare-resources
22952227 - func : fix-absolute-paths
22962228 - func : make-files-executable
2229+ - func : assume-test-secrets-ec2-role
22972230 - command : shell.exec
22982231 params :
22992232 shell : " bash"
2233+ add_expansions_to_env : true
23002234 script : |
23012235 ${PREPARE_SHELL}
23022236 $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/setup.sh
@@ -2321,9 +2255,11 @@ task_groups:
23212255 - func : prepare-resources
23222256 - func : fix-absolute-paths
23232257 - func : make-files-executable
2258+ - func : assume-test-secrets-ec2-role
23242259 - command : shell.exec
23252260 params :
23262261 shell : " bash"
2262+ add_expansions_to_env : true
23272263 script : |
23282264 ${PREPARE_SHELL}
23292265 export AZUREKMS_VMNAME_PREFIX="GODRIVER"
@@ -2375,9 +2311,11 @@ task_groups:
23752311 - func : prepare-resources
23762312 - func : fix-absolute-paths
23772313 - func : make-files-executable
2314+ - func : assume-test-secrets-ec2-role
23782315 - command : subprocess.exec
23792316 params :
23802317 binary : bash
2318+ add_expansions_to_env : true
23812319 env :
23822320 AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
23832321 args :
@@ -2399,9 +2337,11 @@ task_groups:
23992337 - func : prepare-resources
24002338 - func : fix-absolute-paths
24012339 - func : make-files-executable
2340+ - func : assume-test-secrets-ec2-role
24022341 - command : subprocess.exec
24032342 params :
24042343 binary : bash
2344+ add_expansions_to_env : true
24052345 env :
24062346 AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
24072347 args :
@@ -2706,13 +2646,6 @@ buildvariants:
27062646 tasks :
27072647 - name : " .load-balancer"
27082648
2709- - matrix_name : " serverless"
2710- tags : ["pullrequest"]
2711- matrix_spec : { os-serverless: "*" }
2712- display_name : " Serverless ${os-serverless}"
2713- tasks :
2714- - " serverless_task_group"
2715-
27162649 - matrix_name : " kms-kmip-test"
27172650 matrix_spec : { version: ["7.0"], os-ssl-40: ["rhel87-64"] }
27182651 display_name : " KMS KMIP ${os-ssl-40}"
0 commit comments