Define two jobs: One for successful and another one for failed deployments
The following discussion from !1549 should be addressed:
-
@nolith started a discussion: @mayra-cabrera I'm leaving this note with the intent of converting it into a follow-up item.
When a deployment job fails, we will send a notification thanks to
when: always
.When we retry the failed deployment job, it will not execute this job again and it will never send the successful deployment message again.
I think we should do the same thing we are doing in the deployer, where we define 2 jobs, one for successful deployments and one for failed ones (
when: on_failure
), in this way we have 2 independent jobs and after a failed deployment the successful job can still run on a deployment retry.Obviously, we will still have the problem where a second failure will not trigger the message again (but this is exactly the same behavior we have in deployer)