Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(Node 5335): clean up instance profile from instance after CI runs #3719

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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