@@ -37,6 +37,8 @@ functions:
3737 # Applies the subitted patch, if any
3838 # Deprecated. Should be removed. But still needed for certain agents (ZAP)
3939 - command : git.apply_patch
40+
41+ " setup system " :
4042 # Make an evergreen expansion file with dynamic values
4143 - command : subprocess.exec
4244 params :
@@ -49,13 +51,19 @@ functions:
4951 - command : expansions.update
5052 params :
5153 file : src/expansion.yml
52-
53- " prepare resources " :
5454 - command : subprocess.exec
5555 params :
56+ include_expansions_in_env : ["PROJECT_DIRECTORY", "DRIVERS_TOOLS"]
5657 binary : bash
5758 args :
5859 - src/.evergreen/scripts/prepare-resources.sh
60+ # Run drivers-evergreen-tools system setup
61+ - command : subprocess.exec
62+ params :
63+ include_expansions_in_env : ["PROJECT_DIRECTORY", "DRIVERS_TOOLS"]
64+ binary : bash
65+ args :
66+ - ${DRIVERS_TOOLS}/.evergreen/setup.sh
5967
6068 " upload coverage" :
6169 - command : ec2.assume_role
@@ -511,41 +519,32 @@ functions:
511519 - .evergreen/scripts/run-with-env.sh
512520 - .evergreen/scripts/cleanup.sh
513521
514- " teardown " :
522+ " teardown system " :
515523 - command : subprocess.exec
516524 params :
517525 binary : bash
518526 working_dir : " src"
519527 args :
520- - ${DRIVERS_TOOLS}/.evergreen/teardown.sh
521-
522- " fix absolute paths " :
528+ # Ensure the instance profile is reassigned for aws tests.
529+ - ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
523530 - command : subprocess.exec
524531 params :
525532 binary : bash
533+ working_dir : " src"
526534 args :
527- - src/.evergreen/scripts/fix-absolute-paths.sh
528-
529- " windows fix " :
535+ - ${DRIVERS_TOOLS}/.evergreen/csfle/teardown.sh
530536 - command : subprocess.exec
531537 params :
532538 binary : bash
539+ working_dir : " src"
533540 args :
534- - src/.evergreen/scripts/windows-fix.sh
535-
536- " make files executable " :
537- - command : subprocess.exec
538- params :
539- binary : bash
540- args :
541- - src/.evergreen/scripts/make-files-executable.sh
542-
543- " init test-results " :
541+ - ${DRIVERS_TOOLS}/.evergreen/ocsp/teardown.sh
544542 - command : subprocess.exec
545543 params :
546544 binary : bash
545+ working_dir : " src"
547546 args :
548- - src /.evergreen/scripts/init-test-results .sh
547+ - ${DRIVERS_TOOLS} /.evergreen/teardown .sh
549548
550549 " install dependencies " :
551550 - command : subprocess.exec
@@ -621,21 +620,6 @@ functions:
621620 args :
622621 - src/.evergreen/scripts/stop-load-balancer.sh
623622
624- " teardown_docker " :
625- - command : subprocess.exec
626- params :
627- binary : bash
628- args :
629- - src/.evergreen/scripts/teardown-docker.sh
630-
631- " teardown_aws " :
632- - command : subprocess.exec
633- params :
634- binary : bash
635- args :
636- - src/.evergreen/scripts/run-with-env.sh
637- - src/.evergreen/scripts/teardown-aws.sh
638-
639623 " teardown atlas " :
640624 - command : subprocess.exec
641625 params :
@@ -665,33 +649,27 @@ functions:
665649
666650pre :
667651 - func : " fetch source"
668- - func : " prepare resources"
669- - func : " windows fix"
670- - func : " fix absolute paths"
671- - func : " init test-results"
672- - func : " make files executable"
652+ - func : " setup system"
673653 - func : " install dependencies"
674654 - func : " assume ec2 role"
675655
676656post :
677657 # Disabled, causing timeouts
678658 # - func: "upload working dir"
679- - func : " teardown"
659+ - func : " teardown system "
680660 - func : " upload coverage"
681661 - func : " upload mo artifacts"
682662 - func : " upload test results"
683663 - func : " stop mongo-orchestration"
684- - func : " teardown_aws"
685664 - func : " cleanup"
686- - func : " teardown_docker"
687665
688666task_groups :
689667 - name : serverless_task_group
690668 setup_group_can_fail_task : true
691669 setup_group_timeout_secs : 1800 # 30 minutes
692670 setup_group :
693671 - func : " fetch source"
694- - func : " prepare resources "
672+ - func : " setup system "
695673 - command : subprocess.exec
696674 params :
697675 binary : bash
@@ -714,9 +692,7 @@ task_groups:
714692 setup_group_timeout_secs : 1800 # 30 minutes
715693 setup_group :
716694 - func : fetch source
717- - func : prepare resources
718- - func : fix absolute paths
719- - func : make files executable
695+ - func : setup system
720696 - command : subprocess.exec
721697 params :
722698 binary : bash
@@ -735,9 +711,7 @@ task_groups:
735711 - name : testazurekms_task_group
736712 setup_group :
737713 - func : fetch source
738- - func : prepare resources
739- - func : fix absolute paths
740- - func : make files executable
714+ - func : setup system
741715 - command : subprocess.exec
742716 params :
743717 binary : bash
@@ -761,9 +735,7 @@ task_groups:
761735 - name : testazureoidc_task_group
762736 setup_group :
763737 - func : fetch source
764- - func : prepare resources
765- - func : fix absolute paths
766- - func : make files executable
738+ - func : setup system
767739 - command : subprocess.exec
768740 params :
769741 binary : bash
@@ -785,9 +757,7 @@ task_groups:
785757 - name : testgcpoidc_task_group
786758 setup_group :
787759 - func : fetch source
788- - func : prepare resources
789- - func : fix absolute paths
790- - func : make files executable
760+ - func : setup system
791761 - command : subprocess.exec
792762 params :
793763 binary : bash
@@ -809,9 +779,7 @@ task_groups:
809779 - name : testk8soidc_task_group
810780 setup_group :
811781 - func : fetch source
812- - func : prepare resources
813- - func : fix absolute paths
814- - func : make files executable
782+ - func : setup system
815783 - command : ec2.assume_role
816784 params :
817785 role_arn : ${aws_test_secrets_role}
@@ -835,9 +803,7 @@ task_groups:
835803 - name : testoidc_task_group
836804 setup_group :
837805 - func : fetch source
838- - func : prepare resources
839- - func : fix absolute paths
840- - func : make files executable
806+ - func : setup system
841807 - func : " assume ec2 role"
842808 - command : subprocess.exec
843809 params :
@@ -859,7 +825,7 @@ task_groups:
859825 - name : test_aws_lambda_task_group
860826 setup_group :
861827 - func : fetch source
862- - func : prepare resources
828+ - func : setup system
863829 - func : setup atlas
864830 teardown_task :
865831 - func : teardown atlas
@@ -871,9 +837,7 @@ task_groups:
871837 - name : test_atlas_task_group_search_indexes
872838 setup_group :
873839 - func : fetch source
874- - func : prepare resources
875- - func : fix absolute paths
876- - func : make files executable
840+ - func : setup system
877841 - func : setup atlas
878842 teardown_task :
879843 - func : teardown atlas
@@ -1584,7 +1548,7 @@ tasks:
15841548 - name : testazurekms-fail-task
15851549 commands :
15861550 - func : fetch source
1587- - func : make files executable
1551+ - func : setup system
15881552 - func : " bootstrap mongo-orchestration"
15891553 vars :
15901554 VERSION : " latest"
@@ -1640,6 +1604,7 @@ tasks:
16401604 params :
16411605 binary : bash
16421606 working_dir : src
1607+ include_expansions_in_env : ["PYTHON_BINARY"]
16431608 args :
16441609 - .evergreen/scripts/check-import-time.sh
16451610 - ${revision}
0 commit comments