Skip to content

Commit 1aecbb6

Browse files
committed
Dump diagnostic logs from snippets runs
1 parent bb6dfbc commit 1aecbb6

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.evergreen.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ variables:
9393
- func: setup_mongosh
9494
- func: download_kube_tools
9595
- func: build_multi_cluster_binary
96-
teardown_group:
96+
teardown_task:
97+
- func: upload_e2e_logs
9798
- func: upload_code_snippets_logs
9899

99100
- &setup_and_teardown_group_kind_code_snippets

scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ function cleanup() {
2424
echo "Not deleting anything"
2525
fi
2626
}
27-
trap cleanup EXIT
27+
28+
function on_exit() {
29+
evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh
30+
cleanup
31+
}
32+
33+
trap on_exit EXIT
2834

2935
source public/architectures/setup-multi-cluster/setup-gke/env_variables.sh
3036
./public/architectures/setup-multi-cluster/setup-gke/test.sh

scripts/code_snippets/task_gke_multi_cluster_snippets_test.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ function cleanup() {
1919
echo "Not deleting anything"
2020
fi
2121
}
22-
trap cleanup EXIT
22+
23+
function on_exit() {
24+
evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh
25+
cleanup
26+
}
27+
28+
trap on_exit EXIT
2329

2430
source public/architectures/setup-multi-cluster/setup-gke/env_variables.sh
2531
./public/architectures/setup-multi-cluster/setup-gke/test.sh
@@ -41,3 +47,5 @@ source public/architectures/mongodb-replicaset-multi-cluster/env_variables.sh
4147

4248
source public/architectures/mongodb-sharded-multi-cluster/env_variables.sh
4349
./public/architectures/mongodb-sharded-multi-cluster/test.sh
50+
51+
}

scripts/code_snippets/task_kind_community_search_snippets_test.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
set -eou pipefail
44
source scripts/dev/set_env_context.sh
55

6-
dump_logs() {
7-
source scripts/evergreen/e2e/dump_diagnostic_information.sh
8-
dump_all_non_default_namespaces "$@"
6+
function on_exit() {
7+
evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh
98
}
10-
trap dump_logs EXIT
9+
trap on_exit EXIT
1110

1211
test_dir="./docs/community-search/quick-start"
1312

0 commit comments

Comments
 (0)