How to set Reason() when GitLab CI build fails?

When a build fails in GitLab CI it reports the error with the exit code I set from the error but the ‘Reason’ is always empty.

I have searched and cannot find a way to set the Reason. Is there a way?

Example of what I am seeing:

ERROR: Build failed with: Process exited with: 1. Reason was: ()

I am using GitLab CI 7.13.4

1 Like

I’d be glad for an answer too


I see the same thing for my VirtualBox runners.

Looks like it’s actually:

Process exited with: %STATUS%. Reason was: %MSG% (%SIGNAL%)

Which in turn, looks like they are SSH Exit Status, Messages, and Signals; respectively. Might take a look here to figure out how to send the exit pieces back to the host gitlab runner.

I’m too busy to continue searching, atm. It would be nice if that was documented, but it might not be something that can be set. :beers: