Commit 6e4a84a7 authored by Emeric Verschuur's avatar Emeric Verschuur

[fix] Prevent multiple call of citbx_job_finish

parent e68ab8e1
......@@ -122,6 +122,11 @@ citbx_local() {
# Job end handler
citbx_job_finish() {
local CITBX_EXIT_CODE=$?
if [ "$CITBX_JOB_FINISH_CALLED" != "true" ]; then
CITBX_JOB_FINISH_CALLED="true"
else
return 0
fi
for hook in $citbx_job_stage_after; do
cd $CI_PROJECT_DIR
$hook $CITBX_EXIT_CODE
......@@ -132,7 +137,6 @@ citbx_job_finish() {
print_error "CI job failure with exit code $CITBX_EXIT_CODE"
fi
print_note "Job execution time: $(date +"%H hour(s) %M minute(s) and %S second(s)" -ud @$(($(date +%s) - $CITBX_JOB_START_TIME)))"
return 0
}
# If running inside the suitable runner / on gitlab runner
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment