ci: do not exit when an error happens inside the section
Let CI handle that case as it did before. The only thing which needs to be done by the error() function is to get out of the section.
Fixes the issue where a job is not saving artifacts after failure.
Fixes: 4cc0cec473
("ci: implement unified sections")
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21715>
This commit is contained in:

committed by
Marge Bot

parent
944a3af531
commit
d79d62c638
@@ -26,11 +26,8 @@ function error {
|
||||
[ "$state_x" -eq 0 ] || set -x
|
||||
}
|
||||
|
||||
function trap_exit {
|
||||
local ret=$1
|
||||
shift
|
||||
error $CURRENT_SECTION: $*
|
||||
exit $ret
|
||||
function trap_err {
|
||||
error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
|
||||
}
|
||||
|
||||
function build_section_start {
|
||||
@@ -88,7 +85,7 @@ function uncollapsed_section_switch {
|
||||
|
||||
export -f x_off
|
||||
export -f error
|
||||
export -f trap_exit
|
||||
export -f trap_err
|
||||
export -f build_section_start
|
||||
export -f section_start
|
||||
export -f build_section_end
|
||||
@@ -97,4 +94,4 @@ export -f section_switch
|
||||
export -f uncollapsed_section_switch
|
||||
|
||||
set -E
|
||||
trap 'trap_exit $?' ERR
|
||||
trap 'trap_err $?' ERR
|
||||
|
Reference in New Issue
Block a user