In TFS, and I suppose other build system have this too, I can do a gated check-in. That is make the server build a shelfset that is not checked in to any branches yet. If the build succeeds, the changes will be checked in, if it fails, nothing will be checked in.
If the build of such a gated check-in fails the cat should not become red.
Submitted by: bit bonk.