Skip to content

Commit 433b49b

Browse files
all passing?
1 parent c33c2f5 commit 433b49b

File tree

2 files changed

+85
-3
lines changed

2 files changed

+85
-3
lines changed

.evergreen/config.in.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ functions:
7878
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
7979
8080
"bootstrap mongohoused":
81+
- command: ec2.assume_role
82+
params:
83+
role_arn: ${DRIVERS_SECRETS_ARN}
8184
- command: shell.exec
8285
params:
86+
add_expansions_to_env: true
8387
script: |
8488
${PREPARE_SHELL}
8589
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
@@ -354,13 +358,17 @@ functions:
354358
rm -rf ./node_modules/@aws-sdk/credential-providers
355359
356360
"run atlas tests":
361+
- command: ec2.assume_role
362+
params:
363+
role_arn: ${DRIVERS_SECRETS_ARN}
357364
# This creates secrets-export.sh, which is later sourced by run-tests.sh
358365
- command: subprocess.exec
359366
params:
360367
working_dir: "src"
361368
binary: bash
362369
env:
363370
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
371+
add_expansions_to_env: true
364372
args:
365373
- -c
366374
- ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
@@ -441,7 +449,7 @@ functions:
441449
442450
bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
443451
444-
"assume secrets manager rule":
452+
"assume secrets manager rule": &secrets-manager-role
445453
- command: ec2.assume_role
446454
params:
447455
role_arn: ${DRIVERS_SECRETS_ARN}
@@ -623,6 +631,9 @@ functions:
623631
include_expansions_in_env:
624632
- MONGODB_URI
625633
- DRIVERS_TOOLS
634+
- AWS_SECRET_ACCESS_KEY
635+
- AWS_ACCESS_KEY_ID
636+
- AWS_SESSION_TOKEN
626637
env:
627638
AWS_CREDENTIAL_TYPE: env-creds
628639
MONGODB_AWS_SDK: "true"
@@ -742,6 +753,9 @@ functions:
742753
- ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
743754

744755
"build and test alpine FLE":
756+
- command: ec2.assume_role
757+
params:
758+
role_arn: ${DRIVERS_SECRETS_ARN}
745759
- command: subprocess.exec
746760
type: test
747761
params:
@@ -753,6 +767,7 @@ functions:
753767
NODE_VERSION: ${NODE_VERSION}
754768
MONGODB_URI: ${MONGODB_URI}
755769
binary: bash
770+
add_expansions_to_env: true
756771
args:
757772
- .evergreen/docker/alpine.sh
758773

@@ -777,12 +792,13 @@ tasks:
777792
params:
778793
updates:
779794
- { key: NPM_VERSION, value: "9" }
780-
- func: "install dependencies"
795+
- func: assume secrets manager rule
781796
# Upload node driver to a GCP instance
782797
- command: subprocess.exec
783798
type: setup
784799
params:
785800
binary: bash
801+
add_expansions_to_env: true
786802
env:
787803
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
788804
args:
@@ -813,6 +829,7 @@ tasks:
813829

814830
- name: "test-azurekms-task"
815831
commands:
832+
- func: assume secrets manager rule
816833
- command: expansions.update
817834
type: setup
818835
params:
@@ -825,6 +842,7 @@ tasks:
825842
binary: bash
826843
env:
827844
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
845+
add_expansions_to_env: true
828846
args:
829847
- src/.evergreen/run-deployed-azure-kms-tests.sh
830848

@@ -1051,10 +1069,14 @@ task_groups:
10511069
setup_group_timeout_secs: 1800 # 30 minutes
10521070
setup_group:
10531071
- func: fetch source
1072+
- command: ec2.assume_role
1073+
params:
1074+
role_arn: ${DRIVERS_SECRETS_ARN}
10541075
- command: subprocess.exec
10551076
params:
10561077
working_dir: "src"
10571078
binary: bash
1079+
add_expansions_to_env: true
10581080
args:
10591081
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/setup.sh
10601082

@@ -1073,12 +1095,16 @@ task_groups:
10731095
setup_group_timeout_secs: 1800 # 30 minutes
10741096
setup_group:
10751097
- func: fetch source
1098+
- command: ec2.assume_role
1099+
params:
1100+
role_arn: ${DRIVERS_SECRETS_ARN}
10761101
- command: subprocess.exec
10771102
params:
10781103
working_dir: "src"
10791104
binary: bash
10801105
env:
10811106
AZUREKMS_VMNAME_PREFIX: "NODE_DRIVER"
1107+
add_expansions_to_env: true
10821108
args:
10831109
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
10841110

@@ -1105,6 +1131,7 @@ task_groups:
11051131
- command: subprocess.exec
11061132
params:
11071133
binary: bash
1134+
add_expansions_to_env: true
11081135
args:
11091136
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11101137
teardown_group:
@@ -1128,6 +1155,7 @@ task_groups:
11281155
- command: subprocess.exec
11291156
params:
11301157
binary: bash
1158+
add_expansions_to_env: true
11311159
args:
11321160
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11331161
teardown_group:
@@ -1151,6 +1179,7 @@ task_groups:
11511179
- command: subprocess.exec
11521180
params:
11531181
binary: bash
1182+
add_expansions_to_env: true
11541183
args:
11551184
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11561185
teardown_group:
@@ -1190,9 +1219,13 @@ task_groups:
11901219
- name: testazureoidc_task_group
11911220
setup_group:
11921221
- func: fetch source
1222+
- command: ec2.assume_role
1223+
params:
1224+
role_arn: ${DRIVERS_SECRETS_ARN}
11931225
- command: shell.exec
11941226
params:
11951227
shell: bash
1228+
add_expansions_to_env: true
11961229
script: |-
11971230
set -o errexit
11981231
${PREPARE_SHELL}
@@ -1214,9 +1247,13 @@ task_groups:
12141247
- name: testgcpoidc_task_group
12151248
setup_group:
12161249
- func: fetch source
1250+
- command: ec2.assume_role
1251+
params:
1252+
role_arn: ${DRIVERS_SECRETS_ARN}
12171253
- command: shell.exec
12181254
params:
12191255
shell: bash
1256+
add_expansions_to_env: true
12201257
script: |-
12211258
set -o errexit
12221259
${PREPARE_SHELL}
@@ -1268,13 +1305,17 @@ task_groups:
12681305
- name: test_atlas_task_group_search_indexes
12691306
setup_group:
12701307
- func: fetch source
1308+
- command: ec2.assume_role
1309+
params:
1310+
role_arn: ${DRIVERS_SECRETS_ARN}
12711311
- command: subprocess.exec
12721312
params:
12731313
working_dir: src
12741314
binary: bash
12751315
env:
12761316
MONGODB_VERSION: "7.0"
12771317
CLUSTER_PREFIX: dbx-node-search
1318+
add_expansions_to_env: true
12781319
args:
12791320
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
12801321
- command: expansions.update

.evergreen/config.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ functions:
5252
script: |
5353
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
5454
bootstrap mongohoused:
55+
- command: ec2.assume_role
56+
params:
57+
role_arn: ${DRIVERS_SECRETS_ARN}
5558
- command: shell.exec
5659
params:
60+
add_expansions_to_env: true
5761
script: |
5862
${PREPARE_SHELL}
5963
DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
@@ -305,12 +309,16 @@ functions:
305309
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
306310
rm -rf ./node_modules/@aws-sdk/credential-providers
307311
run atlas tests:
312+
- command: ec2.assume_role
313+
params:
314+
role_arn: ${DRIVERS_SECRETS_ARN}
308315
- command: subprocess.exec
309316
params:
310317
working_dir: src
311318
binary: bash
312319
env:
313320
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
321+
add_expansions_to_env: true
314322
args:
315323
- '-c'
316324
- ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
@@ -556,6 +564,9 @@ functions:
556564
include_expansions_in_env:
557565
- MONGODB_URI
558566
- DRIVERS_TOOLS
567+
- AWS_SECRET_ACCESS_KEY
568+
- AWS_ACCESS_KEY_ID
569+
- AWS_SESSION_TOKEN
559570
env:
560571
AWS_CREDENTIAL_TYPE: env-creds
561572
MONGODB_AWS_SDK: 'true'
@@ -664,6 +675,9 @@ functions:
664675
args:
665676
- ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
666677
build and test alpine FLE:
678+
- command: ec2.assume_role
679+
params:
680+
role_arn: ${DRIVERS_SECRETS_ARN}
667681
- command: subprocess.exec
668682
type: test
669683
params:
@@ -675,6 +689,7 @@ functions:
675689
NODE_VERSION: ${NODE_VERSION}
676690
MONGODB_URI: ${MONGODB_URI}
677691
binary: bash
692+
add_expansions_to_env: true
678693
args:
679694
- .evergreen/docker/alpine.sh
680695
tasks:
@@ -699,11 +714,12 @@ tasks:
699714
params:
700715
updates:
701716
- {key: NPM_VERSION, value: '9'}
702-
- func: install dependencies
717+
- func: assume secrets manager rule
703718
- command: subprocess.exec
704719
type: setup
705720
params:
706721
binary: bash
722+
add_expansions_to_env: true
707723
env:
708724
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
709725
args:
@@ -730,6 +746,7 @@ tasks:
730746
- src/.evergreen/run-gcp-kms-tests.sh
731747
- name: test-azurekms-task
732748
commands:
749+
- func: assume secrets manager rule
733750
- command: expansions.update
734751
type: setup
735752
params:
@@ -742,6 +759,7 @@ tasks:
742759
binary: bash
743760
env:
744761
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
762+
add_expansions_to_env: true
745763
args:
746764
- src/.evergreen/run-deployed-azure-kms-tests.sh
747765
- name: test-azurekms-fail-task
@@ -2799,10 +2817,14 @@ task_groups:
27992817
setup_group_timeout_secs: 1800
28002818
setup_group:
28012819
- func: fetch source
2820+
- command: ec2.assume_role
2821+
params:
2822+
role_arn: ${DRIVERS_SECRETS_ARN}
28022823
- command: subprocess.exec
28032824
params:
28042825
working_dir: src
28052826
binary: bash
2827+
add_expansions_to_env: true
28062828
args:
28072829
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/setup.sh
28082830
teardown_group:
@@ -2819,12 +2841,16 @@ task_groups:
28192841
setup_group_timeout_secs: 1800
28202842
setup_group:
28212843
- func: fetch source
2844+
- command: ec2.assume_role
2845+
params:
2846+
role_arn: ${DRIVERS_SECRETS_ARN}
28222847
- command: subprocess.exec
28232848
params:
28242849
working_dir: src
28252850
binary: bash
28262851
env:
28272852
AZUREKMS_VMNAME_PREFIX: NODE_DRIVER
2853+
add_expansions_to_env: true
28282854
args:
28292855
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
28302856
teardown_group:
@@ -2848,6 +2874,7 @@ task_groups:
28482874
- command: subprocess.exec
28492875
params:
28502876
binary: bash
2877+
add_expansions_to_env: true
28512878
args:
28522879
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
28532880
teardown_group:
@@ -2870,6 +2897,7 @@ task_groups:
28702897
- command: subprocess.exec
28712898
params:
28722899
binary: bash
2900+
add_expansions_to_env: true
28732901
args:
28742902
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
28752903
teardown_group:
@@ -2892,6 +2920,7 @@ task_groups:
28922920
- command: subprocess.exec
28932921
params:
28942922
binary: bash
2923+
add_expansions_to_env: true
28952924
args:
28962925
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
28972926
teardown_group:
@@ -2931,9 +2960,13 @@ task_groups:
29312960
- name: testazureoidc_task_group
29322961
setup_group:
29332962
- func: fetch source
2963+
- command: ec2.assume_role
2964+
params:
2965+
role_arn: ${DRIVERS_SECRETS_ARN}
29342966
- command: shell.exec
29352967
params:
29362968
shell: bash
2969+
add_expansions_to_env: true
29372970
script: |-
29382971
set -o errexit
29392972
${PREPARE_SHELL}
@@ -2954,9 +2987,13 @@ task_groups:
29542987
- name: testgcpoidc_task_group
29552988
setup_group:
29562989
- func: fetch source
2990+
- command: ec2.assume_role
2991+
params:
2992+
role_arn: ${DRIVERS_SECRETS_ARN}
29572993
- command: shell.exec
29582994
params:
29592995
shell: bash
2996+
add_expansions_to_env: true
29602997
script: |-
29612998
set -o errexit
29622999
${PREPARE_SHELL}
@@ -3006,13 +3043,17 @@ task_groups:
30063043
- name: test_atlas_task_group_search_indexes
30073044
setup_group:
30083045
- func: fetch source
3046+
- command: ec2.assume_role
3047+
params:
3048+
role_arn: ${DRIVERS_SECRETS_ARN}
30093049
- command: subprocess.exec
30103050
params:
30113051
working_dir: src
30123052
binary: bash
30133053
env:
30143054
MONGODB_VERSION: '7.0'
30153055
CLUSTER_PREFIX: dbx-node-search
3056+
add_expansions_to_env: true
30163057
args:
30173058
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
30183059
- command: expansions.update

0 commit comments

Comments
 (0)