Skip to content

Commit 2174c51

Browse files
committed
PYTHON-4965 - Consolidate startup and teardown tasks
1 parent 1c7a7fe commit 2174c51

File tree

1 file changed

+21
-59
lines changed

1 file changed

+21
-59
lines changed

.evergreen/config.yml

Lines changed: 21 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -519,34 +527,6 @@ functions:
519527
args:
520528
- ${DRIVERS_TOOLS}/.evergreen/teardown.sh
521529

522-
"fix absolute paths":
523-
- command: subprocess.exec
524-
params:
525-
binary: bash
526-
args:
527-
- src/.evergreen/scripts/fix-absolute-paths.sh
528-
529-
"windows fix":
530-
- command: subprocess.exec
531-
params:
532-
binary: bash
533-
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":
544-
- command: subprocess.exec
545-
params:
546-
binary: bash
547-
args:
548-
- src/.evergreen/scripts/init-test-results.sh
549-
550530
"install dependencies":
551531
- command: subprocess.exec
552532
params:
@@ -665,11 +645,7 @@ functions:
665645

666646
pre:
667647
- 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"
648+
- func: "setup system"
673649
- func: "install dependencies"
674650
- func: "assume ec2 role"
675651

@@ -691,7 +667,7 @@ task_groups:
691667
setup_group_timeout_secs: 1800 # 30 minutes
692668
setup_group:
693669
- func: "fetch source"
694-
- func: "prepare resources"
670+
- func: "setup system"
695671
- command: subprocess.exec
696672
params:
697673
binary: bash
@@ -714,9 +690,7 @@ task_groups:
714690
setup_group_timeout_secs: 1800 # 30 minutes
715691
setup_group:
716692
- func: fetch source
717-
- func: prepare resources
718-
- func: fix absolute paths
719-
- func: make files executable
693+
- func: setup system
720694
- command: subprocess.exec
721695
params:
722696
binary: bash
@@ -735,9 +709,7 @@ task_groups:
735709
- name: testazurekms_task_group
736710
setup_group:
737711
- func: fetch source
738-
- func: prepare resources
739-
- func: fix absolute paths
740-
- func: make files executable
712+
- func: setup system
741713
- command: subprocess.exec
742714
params:
743715
binary: bash
@@ -761,9 +733,7 @@ task_groups:
761733
- name: testazureoidc_task_group
762734
setup_group:
763735
- func: fetch source
764-
- func: prepare resources
765-
- func: fix absolute paths
766-
- func: make files executable
736+
- func: setup system
767737
- command: subprocess.exec
768738
params:
769739
binary: bash
@@ -785,9 +755,7 @@ task_groups:
785755
- name: testgcpoidc_task_group
786756
setup_group:
787757
- func: fetch source
788-
- func: prepare resources
789-
- func: fix absolute paths
790-
- func: make files executable
758+
- func: setup system
791759
- command: subprocess.exec
792760
params:
793761
binary: bash
@@ -809,9 +777,7 @@ task_groups:
809777
- name: testk8soidc_task_group
810778
setup_group:
811779
- func: fetch source
812-
- func: prepare resources
813-
- func: fix absolute paths
814-
- func: make files executable
780+
- func: setup system
815781
- command: ec2.assume_role
816782
params:
817783
role_arn: ${aws_test_secrets_role}
@@ -835,9 +801,7 @@ task_groups:
835801
- name: testoidc_task_group
836802
setup_group:
837803
- func: fetch source
838-
- func: prepare resources
839-
- func: fix absolute paths
840-
- func: make files executable
804+
- func: setup system
841805
- func: "assume ec2 role"
842806
- command: subprocess.exec
843807
params:
@@ -859,7 +823,7 @@ task_groups:
859823
- name: test_aws_lambda_task_group
860824
setup_group:
861825
- func: fetch source
862-
- func: prepare resources
826+
- func: setup system
863827
- func: setup atlas
864828
teardown_task:
865829
- func: teardown atlas
@@ -871,9 +835,7 @@ task_groups:
871835
- name: test_atlas_task_group_search_indexes
872836
setup_group:
873837
- func: fetch source
874-
- func: prepare resources
875-
- func: fix absolute paths
876-
- func: make files executable
838+
- func: setup system
877839
- func: setup atlas
878840
teardown_task:
879841
- func: teardown atlas
@@ -1584,7 +1546,7 @@ tasks:
15841546
- name: testazurekms-fail-task
15851547
commands:
15861548
- func: fetch source
1587-
- func: make files executable
1549+
- func: setup system
15881550
- func: "bootstrap mongo-orchestration"
15891551
vars:
15901552
VERSION: "latest"

0 commit comments

Comments
 (0)