@@ -26,6 +26,11 @@ timeout:
26
26
script : |
27
27
ls -la
28
28
functions :
29
+ assume-test-secrets-ec2-role :
30
+ - command : ec2.assume_role
31
+ params :
32
+ role_arn : ${aws_test_secrets_role}
33
+
29
34
fetch-source :
30
35
# Executes clone and applies the submitted patch, if any
31
36
- command : git.get_project
@@ -233,9 +238,13 @@ functions:
233
238
display_name : " test_suite.tgz"
234
239
235
240
bootstrap-mongohoused :
241
+ - command : ec2.assume_role
242
+ params :
243
+ role_arn : ${aws_test_secrets_role}
236
244
- command : subprocess.exec
237
245
params :
238
246
binary : " bash"
247
+ add_expansions_to_env : true
239
248
args :
240
249
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
241
250
- command : subprocess.exec
@@ -580,16 +589,6 @@ functions:
580
589
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
581
590
make evg-test-load-balancers
582
591
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
-
593
592
run-atlas-data-lake-test :
594
593
- command : shell.exec
595
594
type : test
@@ -1830,14 +1829,6 @@ tasks:
1830
1829
AUTH : " noauth"
1831
1830
SSL : " nossl"
1832
1831
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
-
1841
1832
- name : " testgcpkms-task"
1842
1833
commands :
1843
1834
- command : shell.exec
@@ -1896,10 +1887,12 @@ tasks:
1896
1887
1897
1888
- name : " testawskms-task"
1898
1889
commands :
1890
+ - func : assume-test-secrets-ec2-role
1899
1891
- command : shell.exec
1900
1892
type : test
1901
1893
params :
1902
1894
shell : " bash"
1895
+ add_expansions_to_env : true
1903
1896
working_dir : src/go.mongodb.org/mongo-driver
1904
1897
script : |
1905
1898
${PREPARE_SHELL}
@@ -1909,10 +1902,12 @@ tasks:
1909
1902
# testawskms-fail-task runs without environment variables.
1910
1903
# It is expected to fail to obtain credentials.
1911
1904
commands :
1905
+ - func : assume-test-secrets-ec2-role
1912
1906
- command : shell.exec
1913
1907
type : test
1914
1908
params :
1915
1909
shell : " bash"
1910
+ add_expansions_to_env : true
1916
1911
working_dir : src/go.mongodb.org/mongo-driver
1917
1912
script : |
1918
1913
${PREPARE_SHELL}
@@ -1925,6 +1920,7 @@ tasks:
1925
1920
type : test
1926
1921
params :
1927
1922
shell : " bash"
1923
+ add_expansions_to_env : true
1928
1924
working_dir : src/go.mongodb.org/mongo-driver
1929
1925
script : |
1930
1926
${PREPARE_SHELL}
@@ -1957,10 +1953,12 @@ tasks:
1957
1953
# testazurekms-fail-task runs without environment variables.
1958
1954
# It is expected to fail to obtain credentials.
1959
1955
commands :
1956
+ - func : assume-test-secrets-ec2-role
1960
1957
- command : shell.exec
1961
1958
type : test
1962
1959
params :
1963
1960
shell : " bash"
1961
+ add_expansions_to_env : true
1964
1962
working_dir : src/go.mongodb.org/mongo-driver
1965
1963
script : |
1966
1964
${PREPARE_SHELL}
@@ -1985,10 +1983,6 @@ tasks:
1985
1983
1986
1984
- name : " test-aws-lambda-deployed"
1987
1985
commands :
1988
- - command : ec2.assume_role
1989
- params :
1990
- role_arn : ${LAMBDA_AWS_ROLE_ARN}
1991
- duration_seconds : 3600
1992
1986
- command : shell.exec
1993
1987
type : test
1994
1988
params :
@@ -2219,73 +2213,7 @@ axes:
2219
2213
variables :
2220
2214
GO_DIST : " /opt/golang/go1.22"
2221
2215
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
-
2231
2216
task_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
-
2289
2217
- name : testgcpkms_task_group
2290
2218
setup_group_can_fail_task : true
2291
2219
setup_group_timeout_secs : 1800 # 30 minutes
@@ -2294,9 +2222,11 @@ task_groups:
2294
2222
- func : prepare-resources
2295
2223
- func : fix-absolute-paths
2296
2224
- func : make-files-executable
2225
+ - func : assume-test-secrets-ec2-role
2297
2226
- command : shell.exec
2298
2227
params :
2299
2228
shell : " bash"
2229
+ add_expansions_to_env : true
2300
2230
script : |
2301
2231
${PREPARE_SHELL}
2302
2232
$DRIVERS_TOOLS/.evergreen/csfle/gcpkms/setup.sh
@@ -2321,9 +2251,11 @@ task_groups:
2321
2251
- func : prepare-resources
2322
2252
- func : fix-absolute-paths
2323
2253
- func : make-files-executable
2254
+ - func : assume-test-secrets-ec2-role
2324
2255
- command : shell.exec
2325
2256
params :
2326
2257
shell : " bash"
2258
+ add_expansions_to_env : true
2327
2259
script : |
2328
2260
${PREPARE_SHELL}
2329
2261
export AZUREKMS_VMNAME_PREFIX="GODRIVER"
@@ -2375,9 +2307,11 @@ task_groups:
2375
2307
- func : prepare-resources
2376
2308
- func : fix-absolute-paths
2377
2309
- func : make-files-executable
2310
+ - func : assume-test-secrets-ec2-role
2378
2311
- command : subprocess.exec
2379
2312
params :
2380
2313
binary : bash
2314
+ add_expansions_to_env : true
2381
2315
env :
2382
2316
AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
2383
2317
args :
@@ -2399,9 +2333,11 @@ task_groups:
2399
2333
- func : prepare-resources
2400
2334
- func : fix-absolute-paths
2401
2335
- func : make-files-executable
2336
+ - func : assume-test-secrets-ec2-role
2402
2337
- command : subprocess.exec
2403
2338
params :
2404
2339
binary : bash
2340
+ add_expansions_to_env : true
2405
2341
env :
2406
2342
AZUREOIDC_VMNAME_PREFIX : " GO_DRIVER"
2407
2343
args :
@@ -2421,10 +2357,12 @@ task_groups:
2421
2357
setup_group :
2422
2358
- func : fetch-source
2423
2359
- func : prepare-resources
2360
+ - func : assume-test-secrets-ec2-role
2424
2361
- command : subprocess.exec
2425
2362
params :
2426
2363
working_dir : src/go.mongodb.org/mongo-driver
2427
2364
binary : bash
2365
+ add_expansions_to_env : true
2428
2366
env :
2429
2367
LAMBDA_STACK_NAME : dbx-go-lambda
2430
2368
AWS_REGION : us-east-1
@@ -2706,13 +2644,6 @@ buildvariants:
2706
2644
tasks :
2707
2645
- name : " .load-balancer"
2708
2646
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
-
2716
2647
- matrix_name : " kms-kmip-test"
2717
2648
matrix_spec : { version: ["7.0"], os-ssl-40: ["rhel87-64"] }
2718
2649
display_name : " KMS KMIP ${os-ssl-40}"
0 commit comments