From 45f1507a76f0a1351dd52bf3dff8ec27b4e3334d Mon Sep 17 00:00:00 2001 From: RinkiyaKeDad Date: Sat, 27 Mar 2021 16:53:52 +0530 Subject: [PATCH 1/3] feat: fix logs display for e2e test failures Signed-off-by: RinkiyaKeDad --- devel/setup-e2e-deps.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/devel/setup-e2e-deps.sh b/devel/setup-e2e-deps.sh index 42d254da1..b5bc94e22 100755 --- a/devel/setup-e2e-deps.sh +++ b/devel/setup-e2e-deps.sh @@ -60,11 +60,13 @@ echo "Installing sample-external-issuer into the cluster..." # Wait for all background jobs to finish and exit with non-zero if any of them fail # See https://stackoverflow.com/a/515170/919436 for job in $(jobs -p); do - wait $job || let "EXIT+=1" + if wait $job > 0; then + job > /temp/job.txt + fi done -if [[ "$EXIT" > 0 ]]; then - echo "ERROR: ${EXIT} setup jobs failed. Check logs above for details." -fi +for filename in /temp/*.txt; do + cat filename +done exit $EXIT From 79ee98bb5616f0830176fab16201cb5d8fb7ad4c Mon Sep 17 00:00:00 2001 From: RinkiyaKeDad Date: Tue, 30 Mar 2021 16:03:19 +0530 Subject: [PATCH 2/3] feat: running the jobs in series Signed-off-by: RinkiyaKeDad --- devel/setup-e2e-deps.sh | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/devel/setup-e2e-deps.sh b/devel/setup-e2e-deps.sh index b5bc94e22..ca292e9f3 100755 --- a/devel/setup-e2e-deps.sh +++ b/devel/setup-e2e-deps.sh @@ -37,36 +37,22 @@ echo "Installing cert-manager into the cluster..." check_bazel bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //devel/addon/... -EXIT=0 - echo "Installing sample-webhook into the cluster..." -"${SCRIPT_ROOT}/addon/samplewebhook/install.sh" & +"${SCRIPT_ROOT}/addon/samplewebhook/install.sh" echo "Installing bind into the cluster..." -"${SCRIPT_ROOT}/addon/bind/install.sh" & +"${SCRIPT_ROOT}/addon/bind/install.sh" echo "Installing pebble into the cluster..." -"${SCRIPT_ROOT}/addon/pebble/install.sh" & +"${SCRIPT_ROOT}/addon/pebble/install.sh" echo "Installing ingress-nginx into the cluster..." -"${SCRIPT_ROOT}/addon/ingressnginx/install.sh" & +"${SCRIPT_ROOT}/addon/ingressnginx/install.sh" echo "Loading vault into the cluster..." -"${SCRIPT_ROOT}/addon/vault/install.sh" & +"${SCRIPT_ROOT}/addon/vault/install.sh" echo "Installing sample-external-issuer into the cluster..." -"${SCRIPT_ROOT}/addon/sample-external-issuer/install.sh" & +"${SCRIPT_ROOT}/addon/sample-external-issuer/install.sh" -# Wait for all background jobs to finish and exit with non-zero if any of them fail -# See https://stackoverflow.com/a/515170/919436 -for job in $(jobs -p); do - if wait $job > 0; then - job > /temp/job.txt - fi -done - -for filename in /temp/*.txt; do - cat filename -done - -exit $EXIT +exit 0 From a5580a9ab74b733943b2ead0ed15b40cd7a6a58b Mon Sep 17 00:00:00 2001 From: RinkiyaKeDad Date: Tue, 30 Mar 2021 16:46:51 +0530 Subject: [PATCH 3/3] feat: removed exit Signed-off-by: RinkiyaKeDad --- devel/setup-e2e-deps.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/devel/setup-e2e-deps.sh b/devel/setup-e2e-deps.sh index ca292e9f3..5508235f7 100755 --- a/devel/setup-e2e-deps.sh +++ b/devel/setup-e2e-deps.sh @@ -55,4 +55,3 @@ echo "Loading vault into the cluster..." echo "Installing sample-external-issuer into the cluster..." "${SCRIPT_ROOT}/addon/sample-external-issuer/install.sh" -exit 0