Skip to content

Commit 0e1afc0

Browse files
ci(Node 5335): clean up instance profile from instance after CI runs (#3719)
1 parent 7f5b334 commit 0e1afc0

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.evergreen/config.in.yml

+14
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,19 @@ functions:
352352
args:
353353
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"
354354

355+
356+
"reset aws instance profile":
357+
- command: shell.exec
358+
params:
359+
shell: "bash"
360+
script: |
361+
${PREPARE_SHELL}
362+
cd "${DRIVERS_TOOLS}/.evergreen/auth_aws"
363+
if [ -f "./aws_e2e_setup.json" ]; then
364+
. ./activate-authawsvenv.sh
365+
python ./lib/aws_assign_instance_profile.py
366+
fi
367+
355368
"cleanup":
356369
- command: shell.exec
357370
params:
@@ -1087,6 +1100,7 @@ pre:
10871100
- func: "make files executable"
10881101

10891102
post:
1103+
- func: "reset aws instance profile"
10901104
- func: "upload test results"
10911105
- func: "upload coverage report"
10921106
- func: "cleanup"

.evergreen/config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,17 @@ functions:
310310
binary: bash
311311
args:
312312
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh
313+
reset aws instance profile:
314+
- command: shell.exec
315+
params:
316+
shell: bash
317+
script: |
318+
${PREPARE_SHELL}
319+
cd "${DRIVERS_TOOLS}/.evergreen/auth_aws"
320+
if [ -f "./aws_e2e_setup.json" ]; then
321+
. ./activate-authawsvenv.sh
322+
python ./lib/aws_assign_instance_profile.py
323+
fi
313324
cleanup:
314325
- command: shell.exec
315326
params:
@@ -3100,6 +3111,7 @@ pre:
31003111
- func: fix absolute paths
31013112
- func: make files executable
31023113
post:
3114+
- func: reset aws instance profile
31033115
- func: upload test results
31043116
- func: upload coverage report
31053117
- func: cleanup

0 commit comments

Comments
 (0)