Skip to content

Commit 9cd3a61

Browse files
committed
Consolidate teardowns
1 parent 313f954 commit 9cd3a61

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ functions:
519519
- .evergreen/scripts/run-with-env.sh
520520
- .evergreen/scripts/cleanup.sh
521521

522-
"teardown":
522+
"teardown system":
523523
- command: subprocess.exec
524524
params:
525525
binary: bash
@@ -601,20 +601,13 @@ functions:
601601
args:
602602
- src/.evergreen/scripts/stop-load-balancer.sh
603603

604-
"teardown_docker":
605-
- command: subprocess.exec
606-
params:
607-
binary: bash
608-
args:
609-
- src/.evergreen/scripts/teardown-docker.sh
610-
611-
"teardown_aws":
604+
"teardown":
612605
- command: subprocess.exec
613606
params:
614607
binary: bash
615608
args:
616609
- src/.evergreen/scripts/run-with-env.sh
617-
- src/.evergreen/scripts/teardown-aws.sh
610+
- src/.evergreen/scripts/teardown.sh
618611

619612
"teardown atlas":
620613
- command: subprocess.exec
@@ -652,14 +645,13 @@ pre:
652645
post:
653646
# Disabled, causing timeouts
654647
# - func: "upload working dir"
648+
- func: "teardown system"
655649
- func: "teardown"
656650
- func: "upload coverage"
657651
- func: "upload mo artifacts"
658652
- func: "upload test results"
659653
- func: "stop mongo-orchestration"
660-
- func: "teardown_aws"
661654
- func: "cleanup"
662-
- func: "teardown_docker"
663655

664656
task_groups:
665657
- name: serverless_task_group
@@ -1602,6 +1594,7 @@ tasks:
16021594
params:
16031595
binary: bash
16041596
working_dir: src
1597+
include_expansions_in_env: ["PYTHON_BINARY"]
16051598
args:
16061599
- .evergreen/scripts/check-import-time.sh
16071600
- ${revision}

.evergreen/scripts/teardown.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Teardown AWS
4+
pushd "${DRIVERS_TOOLS}/.evergreen/auth_aws" || true
5+
if [ -f "./aws_e2e_setup.json" ]; then
6+
. ./activate-authawsvenv.sh
7+
python ./lib/aws_assign_instance_profile.py
8+
fi
9+
10+
popd || true
11+
12+
# Remove all Docker images
13+
DOCKER=$(command -v docker) || true
14+
if [ -n "$DOCKER" ]; then
15+
docker rmi -f "$(docker images -a -q)" &> /dev/null || true
16+
fi

0 commit comments

Comments
 (0)