I have a Jenkins job with:
- Git SCM which refreshes a local workspace.
- A shell script which also runs some Git CLI commands to make some assertions, and build a dynamic
recipients.txt
file forext-email
to send-to. - Email Ext to send messages, which are supposed to be only on successful refresh of the workspace, then based on some failed assertion based on Git commands in a test in the shell script. This is currently triggered with
Failure - Any
.
What I would like to do is avoid the specific failure email in the case of a remote Git outage causing a Git command to abort - it should only mail-out if all Git commands succeed, but then detect a certain condition.
Is there a way to abort the build and not send Email Ext messages in the case when Git commands fail due to issues on the remote? Would it be best to try and work out how to abort the build and email when Git fails, or is there some Email Ext trigger which could avoid that?