From e1e71ff24083c7fd3b0608643fd0e58ea7c8f1a3 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Fri, 9 Jun 2023 07:54:11 -0600 Subject: [PATCH] add cleanup --- .evergreen/config.in.yml | 14 ++++++++++++++ .evergreen/config.yml | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index ab556056a1..23e5e79359 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -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: @@ -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" diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b55858e5e7..27e25b1802 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -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: @@ -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