gitness: E-mail plugin reports build as succesfull even though other pipelines failed

After updating to 1.0 I’ve converted a matrix build to a multi-machine with a notify step which depends on the previous pipelines, similar to what is suggested here: https://docs.drone.io/user-guide/pipeline/multi-machine/

Instead of Slack, I’m using the e-mail plugin though:

---
kind: pipeline
name: notify

clone:
  disable: true

steps:
- name: notify
  image: drillster/drone-email
  settings:
    # ...

depends_on:
- pipeline_a
- pipeline_b

trigger:
  status:
  - failure

Even though all pipeline_a and pipeline_b failed, I’m getting an email with the message “Successful build #xy”. I guess this is because the plugin gets the status of its own machine / pipeline, not the status of the whole build?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18

Commits related to this issue

Most upvoted comments

Fixed by 4e4932512cc42c668cff8f627235cf1899991a28

The behavior is that the DRONE_BUILD_STATUS will report the global status of all pipeline steps and the new DRONE_STAGE_STATUS will report the status of the currently executing pipeline. There should be no changes required to any of the plugins.

Note that long term we will probably rename DRONE_STAGE_ variables to DRONE_PIPELINE_ so that we have consistent naming, but that is out of scope for this issue 😃