mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
logging: curb CI/GHA special errors for cascading errors during build failure
- otherwise we get 4 errors for each "error" in CI - one for the real error - one for "wait for cleanups" - one for "Docker build failed" - one from GHA itself since command failed (we can't get rid of this)
This commit is contained in:
committed by
igorpecovnik
parent
25929ea6ac
commit
f0f9159faa
@@ -198,7 +198,7 @@ function display_alert() {
|
||||
echo -e "${normal_color}${left_marker:-}${padding:-}${level_indicator}${padding}${normal_color}${right_marker:-}${timing_info}${pids_info}${bashopts_info} ${normal_color}${message}${extra}${normal_color}" >&2
|
||||
|
||||
# Now write to CI, if we're running on it. Remove ANSI escapes which confuse GitHub Actions.
|
||||
if [[ "${CI}" == "true" ]] && [[ "${ci_log}" != "" ]]; then
|
||||
if [[ "${CI}" == "true" ]] && [[ "${ci_log}" != "" ]] && [[ "${skip_ci_special:-"no"}" != "yes" ]]; then
|
||||
echo -e "::${ci_log} ::" "${1} ${2}" | sed 's/\x1b\[[0-9;]*m//g' >&2
|
||||
fi
|
||||
|
||||
|
||||
@@ -108,7 +108,8 @@ function run_cleanup_handlers() {
|
||||
return 0 # No handlers set, just return.
|
||||
else
|
||||
if [[ ${cleanup_exit_code:-0} -gt 0 ]]; then
|
||||
display_alert "Cleaning up" "please wait for cleanups to finish" "error"
|
||||
# No use polluting GHA/CI with notices about cleanup, if we're already failing. skip_ci_special="yes"
|
||||
skip_ci_special="yes" display_alert "Cleaning up" "please wait for cleanups to finish" "error"
|
||||
else
|
||||
display_alert "Cleaning up" "please wait for cleanups to finish" "info"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user