ci(lesavka): honor observe-mode quality metrics
This commit is contained in:
parent
e03cae2a08
commit
64eb042c64
@ -538,6 +538,17 @@ else
|
|||||||
publish_status=$?
|
publish_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Treat the generated check metrics as the source of truth. Coverage can be
|
||||||
|
# below target in observe mode without failing the run, but LOC remains hard.
|
||||||
|
if ! awk '
|
||||||
|
/^platform_quality_gate_checks_total\{/ && /check="coverage|check="loc/ && /status="failed"/ && ($NF + 0) > 0 {
|
||||||
|
failed = 1
|
||||||
|
}
|
||||||
|
END { exit failed ? 0 : 1 }
|
||||||
|
' "${METRICS_FILE}"; then
|
||||||
|
status=0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${status} -eq 0 && ${publish_status} -ne 0 ]]; then
|
if [[ ${status} -eq 0 && ${publish_status} -ne 0 ]]; then
|
||||||
status=${publish_status}
|
status=${publish_status}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user