@@ -98,9 +98,13 @@ functions:
98
98
install-dotnet :
99
99
- command : shell.exec
100
100
params :
101
+ include_expansions_in_env :
102
+ - " OS"
103
+ - " DOTNET_SDK_VERSION"
104
+ - " FRAMEWORK"
101
105
script : |
102
106
${PREPARE_SHELL}
103
- OS=${OS} DOTNET_SDK_VERSION=${DOTNET_SDK_VERSION} bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
107
+ bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
104
108
105
109
prepare-resources :
106
110
- command : shell.exec
@@ -246,6 +250,18 @@ functions:
246
250
params :
247
251
file : mo-expansion.yml
248
252
253
+ generate-sbom :
254
+ - command : shell.exec
255
+ params :
256
+ working_dir : " mongo-csharp-driver"
257
+ env :
258
+ GITHUB_USER : ${github_user}
259
+ GITHUB_APIKEY : ${github_apikey}
260
+ PACKAGE_VERSION : ${PACKAGE_VERSION}
261
+ script : |
262
+ ${PREPARE_SHELL}
263
+ ./evergreen/generate-sbom.sh
264
+
249
265
download-and-promote-augmented-sbom-to-s3-bucket :
250
266
- command : ec2.assume_role
251
267
params :
@@ -276,18 +292,6 @@ functions:
276
292
content_type : application/json
277
293
display_name : augmented-sbom.json
278
294
279
- generate-sbom :
280
- - command : shell.exec
281
- params :
282
- working_dir : " mongo-csharp-driver"
283
- env :
284
- GITHUB_USER : ${github_user}
285
- GITHUB_APIKEY : ${github_apikey}
286
- PACKAGE_VERSION : ${PACKAGE_VERSION}
287
- script : |
288
- ${PREPARE_SHELL}
289
- ./evergreen/generate-sbom.sh
290
-
291
295
generate-ssdlc-report :
292
296
- command : shell.exec
293
297
params :
@@ -326,6 +330,10 @@ functions:
326
330
bootstrap-mongohoused :
327
331
- command : shell.exec
328
332
params :
333
+ include_expansions_in_env :
334
+ - " AWS_ACCESS_KEY_ID"
335
+ - " AWS_SECRET_ACCESS_KEY"
336
+ - " AWS_SESSION_TOKEN"
329
337
script : |
330
338
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
331
339
- command : shell.exec
@@ -364,6 +372,18 @@ functions:
364
372
cd ${DRIVERS_TOOLS}/.evergreen
365
373
DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
366
374
375
+ run-unit-tests :
376
+ - command : shell.exec
377
+ type : test
378
+ params :
379
+ working_dir : mongo-csharp-driver
380
+ shell : " bash"
381
+ include_expansions_in_env :
382
+ - " FRAMEWORK"
383
+ script : |
384
+ ${PREPARE_SHELL}
385
+ bash evergreen/run-unit-tests.sh
386
+
367
387
run-tests :
368
388
- command : shell.exec
369
389
type : test
@@ -451,6 +471,10 @@ functions:
451
471
params :
452
472
shell : " bash"
453
473
working_dir : mongo-csharp-driver
474
+ include_expansions_in_env :
475
+ - " AWS_ACCESS_KEY_ID"
476
+ - " AWS_SECRET_ACCESS_KEY"
477
+ - " AWS_SESSION_TOKEN"
454
478
script : |
455
479
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
456
480
. evergreen/run-atlas-connectivity-tests.sh
@@ -488,9 +512,38 @@ functions:
488
512
script : |
489
513
${PREPARE_SHELL}
490
514
MONGODB_URI="${MONGODB_URI}" ../../evergreen/run-perf-tests.sh
491
- - command : perf.send
515
+ - command : shell.exec
492
516
params :
493
- file : mongo-csharp-driver/benchmarks/MongoDB.Driver.Benchmarks/Benchmark.Artifacts/results/evergreen-results.json
517
+ script : |
518
+ # We use the requester expansion to determine whether the data is from a mainline evergreen run or not
519
+ if [ "${requester}" == "commit" ]; then
520
+ is_mainline=true
521
+ else
522
+ is_mainline=false
523
+ fi
524
+
525
+ # We parse the username out of the order_id as patches append that in and SPS does not need that information
526
+ parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
527
+
528
+ # Submit the performance data to the SPS endpoint
529
+ response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
530
+ "https://performance-monitoring-api.corp.mongodb.com/raw_perf_results/cedar_report?project=${project_id}&version=${version_id}&variant=${build_variant}&order=$parsed_order_id&task_name=${task_name}&task_id=${task_id}&execution=${execution}&mainline=$is_mainline" \
531
+ -H 'accept: application/json' \
532
+ -H 'Content-Type: application/json' \
533
+ -d @mongo-csharp-driver/benchmarks/MongoDB.Driver.Benchmarks/Benchmark.Artifacts/results/evergreen-results.json)
534
+
535
+ http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
536
+ response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
537
+
538
+ # We want to throw an error if the data was not successfully submitted
539
+ if [ "$http_status" -ne 200 ]; then
540
+ echo "Error: Received HTTP status $http_status"
541
+ echo "Response Body: $response_body"
542
+ exit 1
543
+ fi
544
+
545
+ echo "Response Body: $response_body"
546
+ echo "HTTP Status: $http_status"
494
547
495
548
assume-ec2-role :
496
549
- command : ec2.assume_role
@@ -1014,6 +1067,36 @@ post:
1014
1067
- func : cleanup
1015
1068
1016
1069
tasks :
1070
+ - name : unit-tests-net472
1071
+ commands :
1072
+ - command : expansions.update
1073
+ params :
1074
+ updates :
1075
+ - key : ' FRAMEWORK'
1076
+ value : ' net472'
1077
+ - func : install-dotnet
1078
+ - func : run-unit-tests
1079
+
1080
+ - name : unit-tests-netstandard21
1081
+ commands :
1082
+ - command : expansions.update
1083
+ params :
1084
+ updates :
1085
+ - key : ' FRAMEWORK'
1086
+ value : ' netstandard2.1'
1087
+ - func : install-dotnet
1088
+ - func : run-unit-tests
1089
+
1090
+ - name : unit-tests-net60
1091
+ commands :
1092
+ - command : expansions.update
1093
+ params :
1094
+ updates :
1095
+ - key : ' FRAMEWORK'
1096
+ value : ' net6.0'
1097
+ - func : install-dotnet
1098
+ - func : run-unit-tests
1099
+
1017
1100
- name : test-net472
1018
1101
commands :
1019
1102
- func : setup-csfle-secrets
@@ -1195,6 +1278,7 @@ tasks:
1195
1278
1196
1279
- name : atlas-data-lake-test
1197
1280
commands :
1281
+ - func : assume-ec2-role
1198
1282
- func : bootstrap-mongohoused
1199
1283
- func : run-atlas-data-lake-test
1200
1284
@@ -1607,7 +1691,7 @@ tasks:
1607
1691
- name : generate-release-notes
1608
1692
commands :
1609
1693
- func : generate-release-notes
1610
-
1694
+
1611
1695
- name : validate-apidocs
1612
1696
commands :
1613
1697
- func : install-dotnet
@@ -1980,9 +2064,14 @@ task_groups:
1980
2064
setup_group :
1981
2065
- func : fetch-source
1982
2066
- func : prepare-resources
2067
+ - func : assume-ec2-role
1983
2068
- command : subprocess.exec
1984
2069
params :
1985
2070
binary : bash
2071
+ include_expansions_in_env :
2072
+ - " AWS_ACCESS_KEY_ID"
2073
+ - " AWS_SECRET_ACCESS_KEY"
2074
+ - " AWS_SESSION_TOKEN"
1986
2075
env :
1987
2076
LAMBDA_STACK_NAME : dbx-csharp-lambda
1988
2077
args :
@@ -2122,6 +2211,10 @@ task_groups:
2122
2211
binary : bash
2123
2212
env :
2124
2213
VAULT_NAME : ${VAULT_NAME}
2214
+ include_expansions_in_env :
2215
+ - " AWS_ACCESS_KEY_ID"
2216
+ - " AWS_SECRET_ACCESS_KEY"
2217
+ - " AWS_SESSION_TOKEN"
2125
2218
args :
2126
2219
- ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
2127
2220
- command : expansions.update
@@ -2162,6 +2255,42 @@ task_groups:
2162
2255
- validate-apicompat
2163
2256
2164
2257
buildvariants :
2258
+ - name : unit-tests-windows
2259
+ display_name : Unit Tests on Windows
2260
+ run_on : windows-64-vs2017-test
2261
+ expansions :
2262
+ OS : " windows-64"
2263
+ tasks :
2264
+ - name : unit-tests-net472
2265
+ - name : unit-tests-netstandard21
2266
+ - name : unit-tests-net60
2267
+
2268
+ - name : unit-tests-ubuntu
2269
+ display_name : Unit Tests on Ubuntu
2270
+ run_on : ubuntu2004-small
2271
+ expansions :
2272
+ OS : " ubuntu-2004"
2273
+ tasks :
2274
+ - name : unit-tests-netstandard21
2275
+ - name : unit-tests-net60
2276
+
2277
+ - name : unit-tests-macos
2278
+ display_name : Unit Tests on MacOs
2279
+ run_on : macos-14
2280
+ expansions :
2281
+ OS : " macos-14"
2282
+ tasks :
2283
+ - name : unit-tests-netstandard21
2284
+ - name : unit-tests-net60
2285
+
2286
+ - name : unit-tests-macos-arm
2287
+ display_name : Unit Tests on MacOs Arm
2288
+ run_on : macos-14-arm64
2289
+ expansions :
2290
+ OS : " macos-14-arm64"
2291
+ tasks :
2292
+ - name : unit-tests-net60
2293
+
2165
2294
- matrix_name : stable-api-tests
2166
2295
matrix_spec : { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], topology: "standalone", auth: "auth", ssl: "nossl", os: "windows-64" }
2167
2296
display_name : " Stable API ${version} ${topology} ${auth} ${ssl} ${os}"
0 commit comments