DRONE_STAGE_STATUS is success when pipeline stage is failing

Hi,

I have just pulled the latest image from Docker Hub, and noticed this issue while running my pipeline.
I’m using DRONE_STAGE_STATUS to get status of the pipeline stage, it returned ‘success’ when the stage is failing.

Could anyone assist me on this?
Thank you.

This is the notification I got on MS Teams:

image_2021-06-18_095222

From the docs, it looks like it only prints the currently running stage:

Provides the status for the current running pipeline. If all pipeline steps are passing, the pipeline status defaults to success.

Maybe you could use a status trigger?

Hi @hwittenborn,

Thank you for your reply. Actually the trigger was correct, but I’m expecting FAILURE to be the Status instead of success in the notification (2nd picture) and I saw the pipeline status was failing.
FYI, I’m using “DRONE_STAGE_STATUS” variable to get this status.

I ran a quick test (below) and was unable to reproduce any issues with DRONE_STAGE_STATUS

https://github.com/drone/hello-world/blob/29ea8ba4333153e18c04eb543b59ba177f64ed9c/.drone.yml
https://cloud.drone.io/drone/hello-world/270/1/4

1 Like

Hi @bradrydzewski,

Thank you for your reply. I will try your example and update here.