How to notify the build result for both success and failure by email?

I would like to send email notification to user after pipeline build, and I put the notify step as the final step in the pipeline.

I found that if the previos step like installing something got an error, the pipeline will stop execution, so I can’t get an email.

Would it possible to send the notification both success and failure in the pipeline execution?

I use the “drillster/drone-email” image.

You can use the when clause to specify that a step should run on failure. You can see an example at

1 Like

@bradrydzewski Thank so much, I have solve the problem after use when clause.

I found another problem.

When I want to use the {{ build.status }} as the email subject in the “Notify Result” step, I expect that will get the “failure”, bui I get the “success”.

截圖 2020-12-16 下午10.50.27

I’m confused about that.

I recommend contacting the plugin author. They will be able to help you with any questions you have about the plugin. Since I did not create this plugin (and have never used it) it is outside the scope of support that I can provide.

1 Like