Skip to content

Commit d9f5d9f

Browse files
authored
chore(NODE-5777): track aws credential as a devDep in addition to peerDep (#3943)
1 parent 5047328 commit d9f5d9f

9 files changed

+2010
-1998
lines changed

.evergreen/config.in.yml

+24-3
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ functions:
474474
args:
475475
- .evergreen/install-dependencies.sh
476476

477-
"install aws-credential-providers":
477+
"remove aws-credential-providers":
478478
- command: shell.exec
479479
type: setup
480480
params:
@@ -483,7 +483,7 @@ functions:
483483
script: |
484484
${PREPARE_SHELL}
485485
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
486-
npm install @aws-sdk/credential-providers
486+
rm -rf ./node_modules/@aws-sdk/credential-providers
487487
488488
"run atlas tests":
489489
- command: shell.exec
@@ -674,6 +674,8 @@ functions:
674674
- command: shell.exec
675675
type: test
676676
params:
677+
env:
678+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
677679
working_dir: "src"
678680
script: |
679681
${PREPARE_SHELL}
@@ -711,6 +713,8 @@ functions:
711713
- command: shell.exec
712714
type: test
713715
params:
716+
env:
717+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
714718
working_dir: "src"
715719
script: |
716720
${PREPARE_SHELL}
@@ -734,6 +738,8 @@ functions:
734738
- command: shell.exec
735739
type: test
736740
params:
741+
env:
742+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
737743
working_dir: "src"
738744
script: |
739745
${PREPARE_SHELL}
@@ -761,6 +767,8 @@ functions:
761767
- command: shell.exec
762768
type: test
763769
params:
770+
env:
771+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
764772
working_dir: "src"
765773
script: |
766774
${PREPARE_SHELL}
@@ -788,6 +796,7 @@ functions:
788796
- command: shell.exec
789797
type: test
790798
params:
799+
add_expansions_to_env: true
791800
working_dir: "src"
792801
script: |
793802
${PREPARE_SHELL}
@@ -815,6 +824,8 @@ functions:
815824
- command: shell.exec
816825
type: test
817826
params:
827+
env:
828+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
818829
working_dir: "src"
819830
script: |
820831
${PREPARE_SHELL}
@@ -841,6 +852,8 @@ functions:
841852
- command: shell.exec
842853
type: test
843854
params:
855+
env:
856+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
844857
working_dir: "src"
845858
script: |
846859
${PREPARE_SHELL}
@@ -851,6 +864,8 @@ functions:
851864
type: test
852865
params:
853866
working_dir: src
867+
env:
868+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
854869
shell: bash
855870
script: |
856871
${PREPARE_SHELL}
@@ -859,10 +874,16 @@ functions:
859874
860875
# pack up project directory to ssh it to the container
861876
mkdir -p $ECS_SRC_DIR/.evergreen
877+
878+
set -ex
879+
880+
echo "export MONGODB_AWS_SDK=$MONGODB_AWS_SDK" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
881+
echo "if [ $MONGODB_AWS_SDK = 'false' ]; then rm -rf ./node_modules/@aws-sdk/credential-providers; fi" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
882+
echo "npm run check:aws" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
883+
862884
cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
863885
tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
864886
865-
set -ex
866887
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
867888
. ./activate-authawsvenv.sh
868889
export MONGODB_BINARIES="${MONGODB_BINARIES}";

0 commit comments

Comments
 (0)