Skip to content

Commit 4f4ea96

Browse files
committed
Fix pipeline failure
Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 84c5557 commit 4f4ea96

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ analyze_logs_by_logdetective() {
4848
return
4949
fi
5050
jq -rC '.explanation.text' < "/tmp/logdetective_test_output.txt"
51+
set -e
5152
echo "-------- LOGDETECTIVE TEST LOG ANALYSIS FINISHED --------"
5253
}
5354

@@ -74,9 +75,12 @@ for dir in ${VERSIONS}; do
7475
fi
7576

7677
if [ -n "${TEST_MODE}" ]; then
77-
tmp_file=$(mktemp "/tmp/${IMAGE_NAME}-${OS}-${dir}.XXXXXX")
78+
set -o pipefail
79+
tmp_file=$(mktemp "/tmp/${OS}-${dir}.XXXXXX")
7880
VERSION=$dir test/run 2>&1 | tee "$tmp_file"
7981
ret_code=$?
82+
set +o pipefail
83+
cat "${tmp_file}"
8084
if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then
8185
analyze_logs_by_logdetective "$tmp_file"
8286
fi

0 commit comments

Comments
 (0)