Commit 48352826 authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Pass correct exit codes to CI.

parent 57889603
......@@ -114,7 +114,7 @@ if [[ "$1" == "hemera" && "$runStage" == "build_script" ]]; then
case "$jobState" in
"BOOT_FAIL"|"CANCELLED"|"DEADLINE"|"FAILED"|"NODE_FAIL"|"OUT_OF_MEMORY"|"PREEMPTED"|"REVOKED"|"SPECIAL_EXIT"|"TIMEOUT")
exitCode=255
exitCode="$SYSTEM_FAILURE_EXIT_CODE"
1>&2 echo -e "${BOLD_RED}Slurm job stopped$NC"
break;;
"COMPLETED")
......@@ -141,7 +141,11 @@ if [[ "$1" == "hemera" && "$runStage" == "build_script" ]]; then
exit "$exitCode"
else
# run script without intervention
"$script"
# run script, propagate non-zero exit code as build failure code for CI
if "$script"; then
exit 0
else
exit "$BUILD_FAILURE_EXIT_CODE"
fi
fi
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