From 61f86f95e020a3d603be9db0c4fce527527416b7 Mon Sep 17 00:00:00 2001 From: Shubhada Date: Mon, 2 Dec 2024 09:39:52 -0800 Subject: [PATCH 1/3] Fix E2E pipeline failure handling --- .pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 57f2373252b..84a476d1fb9 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -166,7 +166,7 @@ stages: E2E_EXIT_CODE=$? if [ $E2E_EXIT_CODE -ne 0 ]; then echo "##vso[task.logissue type=error] E2E tests failed. Check the logs for more details." - exit 1 + exit $E2E_EXIT_CODE else echo "E2E tests passed." fi From 1f75067b8839f7fad5d5cfe890091962cd9c0eaf Mon Sep 17 00:00:00 2001 From: Shubhada Date: Mon, 2 Dec 2024 09:59:24 -0800 Subject: [PATCH 2/3] Added to ensure correct exit code propagation. --- .pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 84a476d1fb9..4f567abccbe 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -161,7 +161,7 @@ stages: . ./hack/e2e/run-rp-and-e2e.sh deploy_e2e_db register_sub - docker compose up e2e + docker compose up --exit-code-from run-e2e e2e # Check if the E2E tests failed E2E_EXIT_CODE=$? if [ $E2E_EXIT_CODE -ne 0 ]; then From 69a1876482bbb05f6f044e35979f0f2524473cb6 Mon Sep 17 00:00:00 2001 From: Shubhada Date: Mon, 2 Dec 2024 10:13:16 -0800 Subject: [PATCH 3/3] Changed to to correctly capture service exit codes. --- .pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 4f567abccbe..4220d150bcc 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -161,7 +161,7 @@ stages: . ./hack/e2e/run-rp-and-e2e.sh deploy_e2e_db register_sub - docker compose up --exit-code-from run-e2e e2e + docker compose up --exit-code-from e2e e2e # Check if the E2E tests failed E2E_EXIT_CODE=$? if [ $E2E_EXIT_CODE -ne 0 ]; then