diff --git a/tools/gitlab-ci/run.sh b/tools/gitlab-ci/run.sh index f0b03be1b8d9ae1cc0533bd262dfb7a64eeeab3b..6f2af5a9061bafc9602b8ece9aa0d26c824f013c 100755 --- a/tools/gitlab-ci/run.sh +++ b/tools/gitlab-ci/run.sh @@ -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