Gitlab CI Pass/Fail Criteria

My apologies, likely a dumb question - actually, I’m sure it is, but I can’t find it in the documentation anywhere (but likely also me unfortunately).

I assume that a script exit code of 0 is pass, anything else is fail … right? But where / how is this defined?

Thanks!