Skip to content

Commit 80999b5

Browse files
chore(NODE-5776): track aws credential as a devDep in addtion to peerDep (#3939)
Co-authored-by: Alena Khineika <alena.khineika@gmail.com>
1 parent ce7df0f commit 80999b5

File tree

9 files changed

+1974
-1962
lines changed

9 files changed

+1974
-1962
lines changed

.evergreen/config.in.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ functions:
478478
args:
479479
- .evergreen/install-dependencies.sh
480480

481-
"install aws-credential-providers":
481+
"remove aws-credential-providers":
482482
- command: shell.exec
483483
type: setup
484484
params:
@@ -487,7 +487,7 @@ functions:
487487
script: |
488488
${PREPARE_SHELL}
489489
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
490-
npm install @aws-sdk/credential-providers
490+
rm -rf ./node_modules/@aws-sdk/credential-providers
491491
492492
"run atlas tests":
493493
- command: shell.exec
@@ -676,6 +676,8 @@ functions:
676676
- command: shell.exec
677677
type: test
678678
params:
679+
env:
680+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
679681
working_dir: "src"
680682
script: |
681683
${PREPARE_SHELL}
@@ -713,6 +715,8 @@ functions:
713715
- command: shell.exec
714716
type: test
715717
params:
718+
env:
719+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
716720
working_dir: "src"
717721
script: |
718722
${PREPARE_SHELL}
@@ -736,6 +740,8 @@ functions:
736740
- command: shell.exec
737741
type: test
738742
params:
743+
env:
744+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
739745
working_dir: "src"
740746
script: |
741747
${PREPARE_SHELL}
@@ -763,6 +769,8 @@ functions:
763769
- command: shell.exec
764770
type: test
765771
params:
772+
env:
773+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
766774
working_dir: "src"
767775
script: |
768776
${PREPARE_SHELL}
@@ -790,6 +798,7 @@ functions:
790798
- command: shell.exec
791799
type: test
792800
params:
801+
add_expansions_to_env: true
793802
working_dir: "src"
794803
script: |
795804
${PREPARE_SHELL}
@@ -817,6 +826,8 @@ functions:
817826
- command: shell.exec
818827
type: test
819828
params:
829+
env:
830+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
820831
working_dir: "src"
821832
script: |
822833
${PREPARE_SHELL}
@@ -843,6 +854,8 @@ functions:
843854
- command: shell.exec
844855
type: test
845856
params:
857+
env:
858+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
846859
working_dir: "src"
847860
script: |
848861
${PREPARE_SHELL}
@@ -853,6 +866,8 @@ functions:
853866
type: test
854867
params:
855868
working_dir: src
869+
env:
870+
MONGODB_AWS_SDK: ${MONGODB_AWS_SDK}
856871
shell: bash
857872
script: |
858873
${PREPARE_SHELL}
@@ -861,10 +876,16 @@ functions:
861876
862877
# pack up project directory to ssh it to the container
863878
mkdir -p $ECS_SRC_DIR/.evergreen
879+
880+
set -ex
881+
882+
echo "export MONGODB_AWS_SDK=$MONGODB_AWS_SDK" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
883+
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
884+
echo "npm run check:aws" >> $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
885+
864886
cp $PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh $ECS_SRC_DIR/.evergreen
865887
tar -czf $ECS_SRC_DIR/src.tgz -C $PROJECT_DIRECTORY .
866888
867-
set -ex
868889
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
869890
. ./activate-authawsvenv.sh
870891
export MONGODB_BINARIES="${MONGODB_BINARIES}";

0 commit comments

Comments
 (0)