@@ -10,7 +10,7 @@ pre_error_fails_task: true
1010# Actual testing tasks are marked with `type: test`
1111command_type: system
1212
13- # Protect ourself against rogue test case, or curl gone wild, that runs forever.
13+ # Protect ourselves against rogue test case, or curl gone wild, that runs forever.
1414exec_timeout_secs: 5400
1515
1616# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
@@ -21,6 +21,11 @@ timeout:
2121 true
2222
2323functions:
24+ assume-test-secrets-ec2-role:
25+ - command: ec2.assume_role
26+ params:
27+ role_arn: ${aws_test_secrets_role}
28+
2429 "fetch source":
2530 # Executes git clone and applies the submitted patch, if any
2631 - command: git.get_project
@@ -34,7 +39,7 @@ functions:
3439
3540 git submodule update --init --recursive
3641
37- "create expansions" :
42+ setup-system :
3843 # Make an evergreen expansion file with dynamic values
3944 - command: shell.exec
4045 params:
@@ -85,6 +90,7 @@ functions:
8590 export AUTH=${AUTH}
8691 export SSL=${SSL}
8792 export TOPOLOGY=${TOPOLOGY}
93+ export MLAUNCH_TOPOLOGY=${MLAUNCH_TOPOLOGY}
8894 export COMPRESSOR=${COMPRESSOR}
8995 export RVM_RUBY="${RVM_RUBY}"
9096 export MONGODB_VERSION=${MONGODB_VERSION}
@@ -122,12 +128,30 @@ functions:
122128
123129 # See what we've done
124130 cat expansion.yml
125-
126131 # Load the expansion file to make an evergreen variable with the current
127132 # unique version
128133 - command: expansions.update
129134 params:
130135 file: src/expansion.yml
136+ - command: subprocess.exec
137+ params:
138+ binary: bash
139+ include_expansions_in_env: ["PROJECT_DIRECTORY"]
140+ args:
141+ - "${DRIVERS_TOOLS}/.evergreen/setup.sh"
142+
143+ bootstrap-mongo-orchestration:
144+ - command: subprocess.exec
145+ params:
146+ binary: bash
147+ env:
148+ MONGODB_VERSION: ${MONGODB_VERSION}
149+ include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
150+ REQUIRE_API_VERSION, LOAD_BALANCER]
151+ args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"]
152+ - command: expansions.update
153+ params:
154+ file: mo-expansion.yml
131155
132156 "export AWS auth credentials":
133157 - command: shell.exec
@@ -176,6 +200,8 @@ functions:
176200 export AWS_DEFAULT_REGION="${fle_aws_region}"
177201 fi
178202 export CSOT_SPEC_TESTS=1
203+ unset TOPOLOGY
204+ export TOPOLOGY=${MLAUNCH_TOPOLOGY}
179205 TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
180206 .evergreen/run-tests.sh
181207
@@ -252,40 +278,6 @@ functions:
252278 content_type: ${content_type|application/x-gzip}
253279 display_name: "mongodb-logs.tar.gz"
254280
255- "upload working dir":
256- - command: archive.targz_pack
257- params:
258- target: "working-dir.tar.gz"
259- source_dir: ${PROJECT_DIRECTORY}/
260- include:
261- - "./**"
262- - command: s3.put
263- params:
264- aws_key: ${aws_key}
265- aws_secret: ${aws_secret}
266- local_file: working-dir.tar.gz
267- remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-working-dir.tar.gz
268- bucket: mciuploads
269- permissions: public-read
270- content_type: ${content_type|application/x-gzip}
271- display_name: "working-dir.tar.gz"
272- - command: archive.targz_pack
273- params:
274- target: "drivers-dir.tar.gz"
275- source_dir: ${DRIVERS_TOOLS}
276- include:
277- - "./**"
278- - command: s3.put
279- params:
280- aws_key: ${aws_key}
281- aws_secret: ${aws_secret}
282- local_file: drivers-dir.tar.gz
283- remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-drivers-dir.tar.gz
284- bucket: mciuploads
285- permissions: public-read
286- content_type: ${content_type|application/x-gzip}
287- display_name: "drivers-dir.tar.gz"
288-
289281 "upload test results to s3":
290282 - command: s3.put
291283 params:
@@ -357,11 +349,22 @@ functions:
357349 working_dir: "src"
358350 script: |
359351 ${PREPARE_SHELL}
352+ unset TOPOLOGY
353+ export TOPOLOGY=${MLAUNCH_TOPOLOGY}
360354 TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
361355 - command: perf.send
362356 params:
363357 file: "${PROJECT_DIRECTORY}/perf.json"
364358
359+ "run tests with orchestration and drivers tools":
360+ - command: subprocess.exec
361+ type: test
362+ params:
363+ binary: bash
364+ working_dir: "src"
365+ include_expansions_in_env: [MONGODB_URI, AUTH, SSL, TOPOLOGY, COMPRESSOR, RVM_RUBY]
366+ args:
367+ - ".evergreen/run-tests-new.sh"
365368 "run tests":
366369 - command: shell.exec
367370 type: test
@@ -377,6 +380,8 @@ functions:
377380 export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
378381 export AWS_DEFAULT_REGION="${fle_aws_region}"
379382 fi
383+ unset TOPOLOGY
384+ export TOPOLOGY=${MLAUNCH_TOPOLOGY}
380385 .evergreen/run-tests.sh
381386
382387 "run AWS auth tests":
@@ -387,6 +392,8 @@ functions:
387392 working_dir: "src"
388393 script: |
389394 ${PREPARE_SHELL}
395+ unset TOPOLOGY
396+ export TOPOLOGY=${MLAUNCH_TOPOLOGY}
390397 .evergreen/run-tests-aws-auth.sh
391398
392399 "run Kerberos unit tests":
@@ -419,13 +426,12 @@ functions:
419426 .evergreen/run-tests-atlas.sh
420427
421428pre:
429+ - func: assume-test-secrets-ec2-role
422430 - func: "fetch source"
423- - func: "create expansions"
431+ - func: setup-system
424432
425433post:
426434 - func: "delete private environment"
427- # Removed, causing timeouts
428- # - func: "upload working dir"
429435 - func: "upload mo artifacts"
430436 - func: "upload test results"
431437 - func: "upload test results to s3"
@@ -436,7 +442,7 @@ task_groups:
436442 setup_group_timeout_secs: 1800 # 30 minutes
437443 setup_group:
438444 - func: fetch source
439- - func: create expansions
445+ - func: setup-system
440446 - command: shell.exec
441447 params:
442448 shell: "bash"
@@ -486,7 +492,7 @@ task_groups:
486492 setup_group_timeout_secs: 1800 # 30 minutes
487493 setup_group:
488494 - func: fetch source
489- - func: create expansions
495+ - func: setup-system
490496 - command: shell.exec
491497 params:
492498 shell: "bash"
@@ -536,7 +542,7 @@ task_groups:
536542 setup_group_timeout_secs: 1800 # 30 minutes
537543 setup_group:
538544 - func: fetch source
539- - func: "create expansions"
545+ - func: setup-system
540546 - command: shell.exec
541547 params:
542548 shell: "bash"
@@ -573,7 +579,7 @@ task_groups:
573579 setup_group_timeout_secs: 1800 # 30 minutes
574580 setup_group:
575581 - func: fetch source
576- - func: "create expansions"
582+ - func: setup-system
577583 - command: shell.exec
578584 params:
579585 shell: "bash"
@@ -613,6 +619,10 @@ task_groups:
613619 - testazurekms-task
614620
615621tasks:
622+ - name: "run-main-test-suite"
623+ commands:
624+ - func: bootstrap-mongo-orchestration
625+ - func: "run tests with orchestration and drivers tools"
616626 - name: "test-atlas"
617627 commands:
618628 - func: "run Atlas tests"
0 commit comments