diff --git a/.evergreen/config_generator/components/mongohouse.py b/.evergreen/config_generator/components/mongohouse.py index a1f1f213fd..8d262b5da8 100644 --- a/.evergreen/config_generator/components/mongohouse.py +++ b/.evergreen/config_generator/components/mongohouse.py @@ -17,18 +17,22 @@ class BuildMongohouse(Function): name = 'build_mongohouse' - commands = bash_exec( - command_type=EvgCommandType.SETUP, - script='''\ - if [ ! -d "drivers-evergreen-tools" ]; then - git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git - fi - cd drivers-evergreen-tools - export DRIVERS_TOOLS=$(pwd) - - .evergreen/atlas_data_lake/pull-mongohouse-image.sh - ''' - ) + commands = [ + ec2_assume_role (role_arn='${aws_test_secrets_role}'), + bash_exec( + include_expansions_in_env=["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"], + command_type=EvgCommandType.SETUP, + script='''\ + if [ ! -d "drivers-evergreen-tools" ]; then + git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git + fi + cd drivers-evergreen-tools + export DRIVERS_TOOLS=$(pwd) + + .evergreen/atlas_data_lake/pull-mongohouse-image.sh + ''' + ) + ] class RunMongohouse(Function): diff --git a/.evergreen/generated_configs/functions.yml b/.evergreen/generated_configs/functions.yml index e4d45eb7b3..6341391c02 100644 --- a/.evergreen/generated_configs/functions.yml +++ b/.evergreen/generated_configs/functions.yml @@ -201,20 +201,27 @@ functions: permissions: public-read remote_file: mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/rpm-packages.tar.gz build_mongohouse: - command: subprocess.exec - type: setup - params: - binary: bash - args: - - -c - - | - if [ ! -d "drivers-evergreen-tools" ]; then - git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git - fi - cd drivers-evergreen-tools - export DRIVERS_TOOLS=$(pwd) + - command: ec2.assume_role + params: + role_arn: ${aws_test_secrets_role} + - command: subprocess.exec + type: setup + params: + binary: bash + include_expansions_in_env: + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_SESSION_TOKEN + args: + - -c + - | + if [ ! -d "drivers-evergreen-tools" ]; then + git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git + fi + cd drivers-evergreen-tools + export DRIVERS_TOOLS=$(pwd) - .evergreen/atlas_data_lake/pull-mongohouse-image.sh + .evergreen/atlas_data_lake/pull-mongohouse-image.sh check augmented sbom: - command: ec2.assume_role type: setup