diff --git a/.evergreen.yml b/.evergreen.yml index 03fc5be8f..1de82e398 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -93,7 +93,8 @@ variables: - func: setup_mongosh - func: download_kube_tools - func: build_multi_cluster_binary - teardown_group: + teardown_task: + - func: upload_e2e_logs - func: upload_code_snippets_logs - &setup_and_teardown_group_kind_code_snippets diff --git a/public/architectures/setup-multi-cluster/setup-externaldns/code_snippets/0130_create_sa_key.sh b/public/architectures/setup-multi-cluster/setup-externaldns/code_snippets/0130_create_sa_key.sh index af41bc117..349bcb19e 100644 --- a/public/architectures/setup-multi-cluster/setup-externaldns/code_snippets/0130_create_sa_key.sh +++ b/public/architectures/setup-multi-cluster/setup-externaldns/code_snippets/0130_create_sa_key.sh @@ -1,3 +1,3 @@ mkdir -p secrets -gcloud iam service-accounts keys create secrets/external-dns-sa-key.json --iam-account="${DNS_SA_EMAIL}" +gcloud iam service-accounts keys create secrets/external-dns-sa-key.json --iam-account="${DNS_SA_EMAIL}" || true diff --git a/scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh b/scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh index 97245a8c2..0d1d3abb4 100755 --- a/scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh +++ b/scripts/code_snippets/task_gke_multi_cluster_no_mesh_snippets_test.sh @@ -24,7 +24,13 @@ function cleanup() { echo "Not deleting anything" fi } -trap cleanup EXIT + +function on_exit() { + scripts/evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh + cleanup +} + +trap on_exit EXIT source public/architectures/setup-multi-cluster/setup-gke/env_variables.sh ./public/architectures/setup-multi-cluster/setup-gke/test.sh diff --git a/scripts/code_snippets/task_gke_multi_cluster_snippets_test.sh b/scripts/code_snippets/task_gke_multi_cluster_snippets_test.sh index 850a68e9c..579186973 100755 --- a/scripts/code_snippets/task_gke_multi_cluster_snippets_test.sh +++ b/scripts/code_snippets/task_gke_multi_cluster_snippets_test.sh @@ -19,7 +19,13 @@ function cleanup() { echo "Not deleting anything" fi } -trap cleanup EXIT + +function on_exit() { + scripts/evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh + cleanup +} + +trap on_exit EXIT source public/architectures/setup-multi-cluster/setup-gke/env_variables.sh ./public/architectures/setup-multi-cluster/setup-gke/test.sh diff --git a/scripts/code_snippets/task_kind_community_search_snippets_test.sh b/scripts/code_snippets/task_kind_community_search_snippets_test.sh index 4b4501c2c..ff6effca2 100755 --- a/scripts/code_snippets/task_kind_community_search_snippets_test.sh +++ b/scripts/code_snippets/task_kind_community_search_snippets_test.sh @@ -3,11 +3,10 @@ set -eou pipefail source scripts/dev/set_env_context.sh -dump_logs() { - source scripts/evergreen/e2e/dump_diagnostic_information.sh - dump_all_non_default_namespaces "$@" +function on_exit() { + scripts/evergreen/e2e/dump_diagnostic_information_from_all_namespaces.sh } -trap dump_logs EXIT +trap on_exit EXIT test_dir="./docs/community-search/quick-start" diff --git a/scripts/evergreen/e2e/dump_diagnostic_information.sh b/scripts/evergreen/e2e/dump_diagnostic_information.sh index f4ea7b986..d57747223 100755 --- a/scripts/evergreen/e2e/dump_diagnostic_information.sh +++ b/scripts/evergreen/e2e/dump_diagnostic_information.sh @@ -28,6 +28,10 @@ dump_all_non_default_namespaces() { grep -v "kube-public" | \ grep -v "kube-system" | \ grep -v "local-path-storage" | \ + grep -v "gmp-" | \ + grep -v "gke-managed" | \ + grep -v "local-path-storage" | \ + grep -v "local-path-storage" | \ grep -v "metallb-system" )