Build don't failes if step is failed
I have simple bash script which is exit with code 1, but teamcity always mark such build succesfull. I've already added Failure condition with regex “Process exited with code [0-9]”, but this also don't work
Please sign in to leave a comment.
Hi,
The convention for exit status is 0 for success and non-zero for some kind of error. Utilizing the failure condition with the regex 'Process exited with code [0-9]' should work if there is a message indicating 'Process exited with code number(0-9)' in the build log. Kindly check the build log for related messages.
Alternatively, you can handle errors within the Bash scripts and combine this with failure conditions to explicitly mark the build as failed. e.g.
Thanks for the reply, however, we solved the problem differently. Initially, an error appeared in the logs that teamcity could not process the message from the server, and it turned out that when processing the message, the server issued an SQL error related to the collation conflict. We fixed it by converting all the tables in the database and the database itself to one of the collation (utf8mb4_unicode_ci).
After this builds can be marked failed. Also with this fix we dealt with “zombie” builds when they were running for days without stopping
Glad to know that your issue has been fixed. And for now we will close this ticket.
If have any issue about this, please feel free to let me know.