@@ -22,6 +22,11 @@ timeout:
22
22
- " -la"
23
23
24
24
functions :
25
+ " assume secrets manager role " : &assume_secrets_manager_role
26
+ - command : ec2.assume_role
27
+ params :
28
+ role_arn : ${DRIVERS_SECRETS_ARN}
29
+
25
30
" fetch source " :
26
31
# Executes git clone and applies the submitted patch, if any
27
32
- command : git.get_project
@@ -78,8 +83,10 @@ functions:
78
83
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
79
84
80
85
" bootstrap mongohoused " :
86
+ - << : *assume_secrets_manager_role
81
87
- command : shell.exec
82
88
params :
89
+ add_expansions_to_env : true
83
90
script : |
84
91
${PREPARE_SHELL}
85
92
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
@@ -93,9 +100,7 @@ functions:
93
100
docker ps
94
101
95
102
" run tests " :
96
- - command : ec2.assume_role
97
- params :
98
- role_arn : ${DRIVERS_SECRETS_ARN}
103
+ - << : *assume_secrets_manager_role
99
104
- command : subprocess.exec
100
105
type : test
101
106
params :
@@ -133,9 +138,7 @@ functions:
133
138
- command : timeout.update
134
139
params :
135
140
exec_timeout_secs : 1800
136
- - command : ec2.assume_role
137
- params :
138
- role_arn : ${DRIVERS_SECRETS_ARN}
141
+ - << : *assume_secrets_manager_role
139
142
- command : subprocess.exec
140
143
type : test
141
144
params :
@@ -354,13 +357,13 @@ functions:
354
357
rm -rf ./node_modules/@aws-sdk/credential-providers
355
358
356
359
" run atlas tests " :
360
+ - << : *assume_secrets_manager_role
357
361
# This creates secrets-export.sh, which is later sourced by run-tests.sh
358
362
- command : subprocess.exec
359
363
params :
360
364
working_dir : " src"
361
365
binary : bash
362
- env :
363
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
366
+ add_expansions_to_env : true
364
367
args :
365
368
- -c
366
369
- ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
@@ -369,16 +372,12 @@ functions:
369
372
params :
370
373
working_dir : " src"
371
374
binary : bash
372
- env :
373
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
374
- NODE_LTS_VERSION : ${NODE_LTS_VERSION}
375
+ add_expansions_to_env : true
375
376
args :
376
377
- .evergreen/run-atlas-tests.sh
377
378
378
379
" run socks5 tests " :
379
- - command : ec2.assume_role
380
- params :
381
- role_arn : ${DRIVERS_SECRETS_ARN}
380
+ - << : *assume_secrets_manager_role
382
381
- command : subprocess.exec
383
382
type : test
384
383
params :
@@ -400,9 +399,7 @@ functions:
400
399
- .evergreen/run-kerberos-tests.sh
401
400
402
401
" run ldap tests " :
403
- - command : ec2.assume_role
404
- params :
405
- role_arn : ${DRIVERS_SECRETS_ARN}
402
+ - << : *assume_secrets_manager_role
406
403
- command : subprocess.exec
407
404
type : test
408
405
params :
@@ -441,11 +438,6 @@ functions:
441
438
442
439
bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
443
440
444
- " assume secrets manager rule " :
445
- - command : ec2.assume_role
446
- params :
447
- role_arn : ${DRIVERS_SECRETS_ARN}
448
-
449
441
" run aws auth test with regular aws credentials " :
450
442
- command : subprocess.exec
451
443
type : test
@@ -623,6 +615,9 @@ functions:
623
615
include_expansions_in_env :
624
616
- MONGODB_URI
625
617
- DRIVERS_TOOLS
618
+ - AWS_SECRET_ACCESS_KEY
619
+ - AWS_ACCESS_KEY_ID
620
+ - AWS_SESSION_TOKEN
626
621
env :
627
622
AWS_CREDENTIAL_TYPE : env-creds
628
623
MONGODB_AWS_SDK : " true"
@@ -728,31 +723,24 @@ functions:
728
723
args :
729
724
- ${PROJECT_DIRECTORY}/.evergreen/run-x509-tests.sh
730
725
731
- install mongodb-client-encryption :
726
+ install mongodb-client-encryption from source :
732
727
- command : subprocess.exec
733
728
type : setup
734
729
params :
735
730
working_dir : " src"
736
- env :
737
- INSTALL_DIR : mongodb-client-encryption
738
- PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
739
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
731
+ add_expansions_to_env : true
740
732
binary : bash
741
733
args :
742
734
- ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
743
735
744
736
" build and test alpine FLE " :
737
+ - << : *assume_secrets_manager_role
745
738
- command : subprocess.exec
746
739
type : test
747
740
params :
748
741
working_dir : " src"
749
- env :
750
- INSTALL_DIR : mongodb-client-encryption
751
- PROJECT_DIRECTORY : ${PROJECT_DIRECTORY}
752
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
753
- NODE_VERSION : ${NODE_VERSION}
754
- MONGODB_URI : ${MONGODB_URI}
755
742
binary : bash
743
+ add_expansions_to_env : true
756
744
args :
757
745
- .evergreen/docker/alpine.sh
758
746
@@ -777,14 +765,14 @@ tasks:
777
765
params :
778
766
updates :
779
767
- { key: NPM_VERSION, value: "9" }
768
+ - func : assume secrets manager role
780
769
- func : " install dependencies"
781
770
# Upload node driver to a GCP instance
782
771
- command : subprocess.exec
783
772
type : setup
784
773
params :
785
774
binary : bash
786
- env :
787
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
775
+ add_expansions_to_env : true
788
776
args :
789
777
- src/.evergreen/run-deployed-gcp-kms-tests.sh
790
778
@@ -819,12 +807,12 @@ tasks:
819
807
updates :
820
808
- { key: NPM_VERSION, value: "9" }
821
809
- func : " install dependencies"
810
+ - func : assume secrets manager role
822
811
- command : subprocess.exec
823
812
type : setup
824
813
params :
825
814
binary : bash
826
- env :
827
- DRIVERS_TOOLS : ${DRIVERS_TOOLS}
815
+ add_expansions_to_env : true
828
816
args :
829
817
- src/.evergreen/run-deployed-azure-kms-tests.sh
830
818
@@ -1051,10 +1039,12 @@ task_groups:
1051
1039
setup_group_timeout_secs : 1800 # 30 minutes
1052
1040
setup_group :
1053
1041
- func : fetch source
1042
+ - func : assume secrets manager role
1054
1043
- command : subprocess.exec
1055
1044
params :
1056
1045
working_dir : " src"
1057
1046
binary : bash
1047
+ add_expansions_to_env : true
1058
1048
args :
1059
1049
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/setup.sh
1060
1050
@@ -1073,12 +1063,14 @@ task_groups:
1073
1063
setup_group_timeout_secs : 1800 # 30 minutes
1074
1064
setup_group :
1075
1065
- func : fetch source
1066
+ - func : assume secrets manager role
1076
1067
- command : subprocess.exec
1077
1068
params :
1078
1069
working_dir : " src"
1079
1070
binary : bash
1080
1071
env :
1081
1072
AZUREKMS_VMNAME_PREFIX : " NODE_DRIVER"
1073
+ add_expansions_to_env : true
1082
1074
args :
1083
1075
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
1084
1076
@@ -1099,12 +1091,11 @@ task_groups:
1099
1091
- name : testk8soidc_task_group_eks
1100
1092
setup_group :
1101
1093
- func : fetch source
1102
- - command : ec2.assume_role
1103
- params :
1104
- role_arn : ${DRIVERS_SECRETS_ARN}
1094
+ - func : assume secrets manager role
1105
1095
- command : subprocess.exec
1106
1096
params :
1107
1097
binary : bash
1098
+ add_expansions_to_env : true
1108
1099
args :
1109
1100
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
1110
1101
teardown_group :
@@ -1122,12 +1113,11 @@ task_groups:
1122
1113
- name : testk8soidc_task_group_gke
1123
1114
setup_group :
1124
1115
- func : fetch source
1125
- - command : ec2.assume_role
1126
- params :
1127
- role_arn : ${DRIVERS_SECRETS_ARN}
1116
+ - func : assume secrets manager role
1128
1117
- command : subprocess.exec
1129
1118
params :
1130
1119
binary : bash
1120
+ add_expansions_to_env : true
1131
1121
args :
1132
1122
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
1133
1123
teardown_group :
@@ -1145,12 +1135,11 @@ task_groups:
1145
1135
- name : testk8soidc_task_group_aks
1146
1136
setup_group :
1147
1137
- func : fetch source
1148
- - command : ec2.assume_role
1149
- params :
1150
- role_arn : ${DRIVERS_SECRETS_ARN}
1138
+ - func : assume secrets manager role
1151
1139
- command : subprocess.exec
1152
1140
params :
1153
1141
binary : bash
1142
+ add_expansions_to_env : true
1154
1143
args :
1155
1144
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
1156
1145
teardown_group :
@@ -1168,9 +1157,7 @@ task_groups:
1168
1157
- name : testtestoidc_task_group
1169
1158
setup_group :
1170
1159
- func : fetch source
1171
- - command : ec2.assume_role
1172
- params :
1173
- role_arn : ${DRIVERS_SECRETS_ARN}
1160
+ - func : assume secrets manager role
1174
1161
- command : subprocess.exec
1175
1162
params :
1176
1163
binary : bash
@@ -1190,9 +1177,11 @@ task_groups:
1190
1177
- name : testazureoidc_task_group
1191
1178
setup_group :
1192
1179
- func : fetch source
1180
+ - func : assume secrets manager role
1193
1181
- command : shell.exec
1194
1182
params :
1195
1183
shell : bash
1184
+ add_expansions_to_env : true
1196
1185
script : |-
1197
1186
set -o errexit
1198
1187
${PREPARE_SHELL}
@@ -1214,9 +1203,11 @@ task_groups:
1214
1203
- name : testgcpoidc_task_group
1215
1204
setup_group :
1216
1205
- func : fetch source
1206
+ - func : assume secrets manager role
1217
1207
- command : shell.exec
1218
1208
params :
1219
1209
shell : bash
1210
+ add_expansions_to_env : true
1220
1211
script : |-
1221
1212
set -o errexit
1222
1213
${PREPARE_SHELL}
@@ -1238,14 +1229,19 @@ task_groups:
1238
1229
- name : test_atlas_task_group
1239
1230
setup_group :
1240
1231
- func : fetch source
1232
+ - command : expansions.update
1233
+ type : " setup"
1234
+ params :
1235
+ updates :
1236
+ - { key: MONGODB_VERSION, value: "7.0" }
1237
+ - { key: LAMBDA_STACK_NAME, value: "dbx-node-lambda" }
1238
+ - { key: CLUSTER_PREFIX, value: "dbx-node-lambda" }
1239
+ - func : assume secrets manager role
1241
1240
- command : subprocess.exec
1242
1241
params :
1243
1242
working_dir : src
1244
1243
binary : bash
1245
- env :
1246
- MONGODB_VERSION : " 7.0"
1247
- LAMBDA_STACK_NAME : dbx-node-lambda
1248
- CLUSTER_PREFIX : dbx-node-lambda
1244
+ add_expansions_to_env : true
1249
1245
args :
1250
1246
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
1251
1247
- atlas
@@ -1268,13 +1264,18 @@ task_groups:
1268
1264
- name : test_atlas_task_group_search_indexes
1269
1265
setup_group :
1270
1266
- func : fetch source
1267
+ - command : expansions.update
1268
+ type : " setup"
1269
+ params :
1270
+ updates :
1271
+ - { key: MONGODB_VERSION, value: "7.0" }
1272
+ - { key: CLUSTER_PREFIX, value: "dbx-node-lambda" }
1273
+ - func : assume secrets manager role
1271
1274
- command : subprocess.exec
1272
1275
params :
1273
1276
working_dir : src
1274
1277
binary : bash
1275
- env :
1276
- MONGODB_VERSION : " 7.0"
1277
- CLUSTER_PREFIX : dbx-node-search
1278
+ add_expansions_to_env : true
1278
1279
args :
1279
1280
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
1280
1281
- command : expansions.update
0 commit comments