Skip to content

Commit 39a69ff

Browse files
committed
Enable logdetective only for RHEL systems
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent d5d33ce commit 39a69ff

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,11 @@ function docker_build_with_version {
233233
if [[ "$commit_message" == *"COMMIT"* ]] && [[ "$last_row" =~ (^-->)?(Using cache )?[a-fA-F0-9]+$ ]]; then
234234
IMAGE_ID="$last_row"
235235
else
236-
# Do not fail in case of sending log to pastebin or logdetective fails.
237-
echo "Analyse logs by logdetective, why it failed."
238-
analyze_logs_by_logdetective "${tmp_file}"
236+
if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then
237+
# Do not fail in case of sending log to pastebin or logdetective fails.
238+
echo "Analyse logs by logdetective, why it failed."
239+
analyze_logs_by_logdetective "${tmp_file}"
240+
fi
239241
exit 1
240242
fi
241243

test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ for dir in ${VERSIONS}; do
7575
tmp_file=$(mktemp "/tmp/${IMAGE_NAME}-${OS}-${dir}.XXXXXX")
7676
VERSION=$dir test/run 2>&1 | tee "$tmp_file"
7777
ret_code=$?
78-
analyze_logs_by_logdetective "$tmp_file"
78+
if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then
79+
analyze_logs_by_logdetective "$tmp_file"
80+
fi
7981
failed_version "$ret_code" "$dir"
8082
rm -f "$tmp_file"
8183
fi

0 commit comments

Comments
 (0)