Skip to content

Commit

Permalink
ci(Node 5335): clean up instance profile from instance after CI runs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Jun 12, 2023
1 parent 7f5b334 commit 0e1afc0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,19 @@ functions:
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"


"reset aws instance profile":
- command: shell.exec
params:
shell: "bash"
script: |
${PREPARE_SHELL}
cd "${DRIVERS_TOOLS}/.evergreen/auth_aws"
if [ -f "./aws_e2e_setup.json" ]; then
. ./activate-authawsvenv.sh
python ./lib/aws_assign_instance_profile.py
fi
"cleanup":
- command: shell.exec
params:
Expand Down Expand Up @@ -1087,6 +1100,7 @@ pre:
- func: "make files executable"

post:
- func: "reset aws instance profile"
- func: "upload test results"
- func: "upload coverage report"
- func: "cleanup"
Expand Down
12 changes: 12 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,17 @@ functions:
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh
reset aws instance profile:
- command: shell.exec
params:
shell: bash
script: |
${PREPARE_SHELL}
cd "${DRIVERS_TOOLS}/.evergreen/auth_aws"
if [ -f "./aws_e2e_setup.json" ]; then
. ./activate-authawsvenv.sh
python ./lib/aws_assign_instance_profile.py
fi
cleanup:
- command: shell.exec
params:
Expand Down Expand Up @@ -3100,6 +3111,7 @@ pre:
- func: fix absolute paths
- func: make files executable
post:
- func: reset aws instance profile
- func: upload test results
- func: upload coverage report
- func: cleanup
Expand Down

0 comments on commit 0e1afc0

Please sign in to comment.