How to handle failures gracefully (possibly with custom status)

I have a CI pipeline, with a parent-children format but I believe this hierarchy is not affecting the case. In the child pipeline, there’s a stage where multiple jobs are run in parallel, and the next stage starts after all finishes (successfully or not, as I’ve enabled allow_failure for different jobs in the former stage, and the latter stage has needs with optional enabled).

I would like to control the status of the parallel jobs. These actually run on small clusters of data, and before completing the process, I know how many passed. I would like to return different exit codes (say, 3 different codes for all passed, at least one passed, all failed). I can return 0/1/2, or any code of my choice, but as far as I can see, differentiation between complete or partial failure is not possible.

Question: Is there some other feature which can handle this? Is it possible to show a status of my choice, or some other way to handle these in exit_codes option?

Would setting variables in the after_script of each of the parallel jobs enable this functionality?

Job 1 sets Variable1 = true if passed
Job 2 sets Variable 2 = true if passed
Job 3 sets Variable 3 = true if passed

Job 4 reads Variable 1-3 and can determine the pipeline status to build next steps.

Just brain storming here not sure if this is something you already looked at or not.

Hi, thanks for the response.

I think I may have explained my problem wrong. The codes of all stages, the one with parallel and the one later, already supports all 3 cases. Whatever be the scenario, it’ll perform accordingly. My issue is the display in UI.

  1. If all works, I want to see :white_check_mark:
  2. If all fails, I want to see :x:
  3. If some passes and some fails, I want to see :exclamation:

Also, it would be very nice to have a feature if the message displayed while hovering can be controlled by me.

Does it help?