Drillster / drone-email

Drone plugin for sending email notifications
Apache License 2.0
46 stars 43 forks source link

Example `when` clause #45

Closed jjasghar closed 3 years ago

jjasghar commented 3 years ago

If i add a when to my pipeline: https://github.com/jjasghar/drone-example-yamls/blob/main/kind-exec.drone.yaml#L5-L14 it seems to skip it.

Should I run this after the exec or does when not work? I'm having trouble :(

mjwwit commented 3 years ago

Looking at your when configuration, it seems the step only runs when one of the previous steps failed, or when a previous build failed, but this one succeeded. If you want this step to always send an email, replace changed with success. You can find the docs for Drone conditions related to build status here: https://docs.drone.io/pipeline/docker/syntax/conditions/#by-status

jjasghar commented 3 years ago

@mjwwit oh! thanks for this. I'll move the run down to the end. Maybe we should put a note in the README that it should (in most cases) be the last thing in your pipeline?