Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit c180e48

Browse files
committed
build: ensure check.sh fails if *any* requested check fails
The current logic, which is bugged, is: if at least one health check succeeded, check.sh succeeds. otherwise, check.sh fails. This is bugged because it allows CI to pass even if all healthchecks except for one failed. We change the logic to instead be: if no checks ran at all OR if at least one check failed, check.sh fails. otherwise, check.sh suceeds.
1 parent 8009b94 commit c180e48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

check.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ fi
123123

124124
echo "Successful checks:${succeeded:- NONE}"
125125
echo "Failed checks:${failed:- NONE}"
126-
if [[ "$succeeded" ]]; then
126+
if [[ -z "$succeeded" ]] && [[ -z "$failed" ]]; then
127+
echo "No checks ran. Exiting as failure."
128+
exit 1
129+
elif [[ -z "$failed" ]]; then
127130
echo "Check result: SUCCESS"
128131
exit 0
129132
else

0 commit comments

Comments
 (0)