@@ -22,6 +22,11 @@ timeout:
2222 - " -la"
2323
2424functions :
25+ " assume secrets manager role " : &assume_secrets_manager_role
26+ - command : ec2.assume_role
27+ params :
28+ role_arn : ${DRIVERS_SECRETS_ARN}
29+
2530 " fetch source " :
2631 # Executes git clone and applies the submitted patch, if any
2732 - command : git.get_project
@@ -78,9 +83,7 @@ functions:
7883 bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
7984
8085 " bootstrap mongohoused " :
81- - command : ec2.assume_role
82- params :
83- role_arn : ${DRIVERS_SECRETS_ARN}
86+ - << : *assume_secrets_manager_role
8487 - command : shell.exec
8588 params :
8689 add_expansions_to_env : true
@@ -97,9 +100,7 @@ functions:
97100 docker ps
98101
99102 " run tests " :
100- - command : ec2.assume_role
101- params :
102- role_arn : ${DRIVERS_SECRETS_ARN}
103+ - << : *assume_secrets_manager_role
103104 - command : subprocess.exec
104105 type : test
105106 params :
@@ -137,9 +138,7 @@ functions:
137138 - command : timeout.update
138139 params :
139140 exec_timeout_secs : 1800
140- - command : ec2.assume_role
141- params :
142- role_arn : ${DRIVERS_SECRETS_ARN}
141+ - << : *assume_secrets_manager_role
143142 - command : subprocess.exec
144143 type : test
145144 params :
@@ -358,9 +357,7 @@ functions:
358357 rm -rf ./node_modules/@aws-sdk/credential-providers
359358
360359 " run atlas tests " :
361- - command : ec2.assume_role
362- params :
363- role_arn : ${DRIVERS_SECRETS_ARN}
360+ - << : *assume_secrets_manager_role
364361 # This creates secrets-export.sh, which is later sourced by run-tests.sh
365362 - command : subprocess.exec
366363 params :
@@ -380,9 +377,7 @@ functions:
380377 - .evergreen/run-atlas-tests.sh
381378
382379 " run socks5 tests " :
383- - command : ec2.assume_role
384- params :
385- role_arn : ${DRIVERS_SECRETS_ARN}
380+ - << : *assume_secrets_manager_role
386381 - command : subprocess.exec
387382 type : test
388383 params :
@@ -404,9 +399,7 @@ functions:
404399 - .evergreen/run-kerberos-tests.sh
405400
406401 " run ldap tests " :
407- - command : ec2.assume_role
408- params :
409- role_arn : ${DRIVERS_SECRETS_ARN}
402+ - << : *assume_secrets_manager_role
410403 - command : subprocess.exec
411404 type : test
412405 params :
@@ -445,11 +438,6 @@ functions:
445438
446439 bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
447440
448- " assume secrets manager role " :
449- - command : ec2.assume_role
450- params :
451- role_arn : ${DRIVERS_SECRETS_ARN}
452-
453441 " run aws auth test with regular aws credentials " :
454442 - command : subprocess.exec
455443 type : test
@@ -746,9 +734,7 @@ functions:
746734 - ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
747735
748736 " build and test alpine FLE " :
749- - command : ec2.assume_role
750- params :
751- role_arn : ${DRIVERS_SECRETS_ARN}
737+ - << : *assume_secrets_manager_role
752738 - command : subprocess.exec
753739 type : test
754740 params :
0 commit comments