Skip to content

Commit 44d1370

Browse files
Revert changes made to evergreen.yml
Undoing unintended changes to evergreen.yml
1 parent f5c13b3 commit 44d1370

File tree

1 file changed

+145
-16
lines changed

1 file changed

+145
-16
lines changed

evergreen/evergreen.yml

Lines changed: 145 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,13 @@ functions:
9898
install-dotnet:
9999
- command: shell.exec
100100
params:
101+
include_expansions_in_env:
102+
- "OS"
103+
- "DOTNET_SDK_VERSION"
104+
- "FRAMEWORK"
101105
script: |
102106
${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
104108
105109
prepare-resources:
106110
- command: shell.exec
@@ -246,6 +250,18 @@ functions:
246250
params:
247251
file: mo-expansion.yml
248252

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+
249265
download-and-promote-augmented-sbom-to-s3-bucket:
250266
- command: ec2.assume_role
251267
params:
@@ -276,18 +292,6 @@ functions:
276292
content_type: application/json
277293
display_name: augmented-sbom.json
278294

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-
291295
generate-ssdlc-report:
292296
- command: shell.exec
293297
params:
@@ -326,6 +330,10 @@ functions:
326330
bootstrap-mongohoused:
327331
- command: shell.exec
328332
params:
333+
include_expansions_in_env:
334+
- "AWS_ACCESS_KEY_ID"
335+
- "AWS_SECRET_ACCESS_KEY"
336+
- "AWS_SESSION_TOKEN"
329337
script: |
330338
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
331339
- command: shell.exec
@@ -364,6 +372,18 @@ functions:
364372
cd ${DRIVERS_TOOLS}/.evergreen
365373
DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
366374
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+
367387
run-tests:
368388
- command: shell.exec
369389
type: test
@@ -451,6 +471,10 @@ functions:
451471
params:
452472
shell: "bash"
453473
working_dir: mongo-csharp-driver
474+
include_expansions_in_env:
475+
- "AWS_ACCESS_KEY_ID"
476+
- "AWS_SECRET_ACCESS_KEY"
477+
- "AWS_SESSION_TOKEN"
454478
script: |
455479
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
456480
. evergreen/run-atlas-connectivity-tests.sh
@@ -488,9 +512,38 @@ functions:
488512
script: |
489513
${PREPARE_SHELL}
490514
MONGODB_URI="${MONGODB_URI}" ../../evergreen/run-perf-tests.sh
491-
- command: perf.send
515+
- command: shell.exec
492516
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"
494547
495548
assume-ec2-role:
496549
- command: ec2.assume_role
@@ -1014,6 +1067,36 @@ post:
10141067
- func: cleanup
10151068

10161069
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+
10171100
- name: test-net472
10181101
commands:
10191102
- func: setup-csfle-secrets
@@ -1195,6 +1278,7 @@ tasks:
11951278

11961279
- name: atlas-data-lake-test
11971280
commands:
1281+
- func: assume-ec2-role
11981282
- func: bootstrap-mongohoused
11991283
- func: run-atlas-data-lake-test
12001284

@@ -1607,7 +1691,7 @@ tasks:
16071691
- name: generate-release-notes
16081692
commands:
16091693
- func: generate-release-notes
1610-
1694+
16111695
- name: validate-apidocs
16121696
commands:
16131697
- func: install-dotnet
@@ -1980,9 +2064,14 @@ task_groups:
19802064
setup_group:
19812065
- func: fetch-source
19822066
- func: prepare-resources
2067+
- func: assume-ec2-role
19832068
- command: subprocess.exec
19842069
params:
19852070
binary: bash
2071+
include_expansions_in_env:
2072+
- "AWS_ACCESS_KEY_ID"
2073+
- "AWS_SECRET_ACCESS_KEY"
2074+
- "AWS_SESSION_TOKEN"
19862075
env:
19872076
LAMBDA_STACK_NAME: dbx-csharp-lambda
19882077
args:
@@ -2122,6 +2211,10 @@ task_groups:
21222211
binary: bash
21232212
env:
21242213
VAULT_NAME: ${VAULT_NAME}
2214+
include_expansions_in_env:
2215+
- "AWS_ACCESS_KEY_ID"
2216+
- "AWS_SECRET_ACCESS_KEY"
2217+
- "AWS_SESSION_TOKEN"
21252218
args:
21262219
- ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
21272220
- command: expansions.update
@@ -2162,6 +2255,42 @@ task_groups:
21622255
- validate-apicompat
21632256

21642257
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+
21652294
- matrix_name: stable-api-tests
21662295
matrix_spec: { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], topology: "standalone", auth: "auth", ssl: "nossl", os: "windows-64" }
21672296
display_name: "Stable API ${version} ${topology} ${auth} ${ssl} ${os}"

0 commit comments

Comments
 (0)