Closed immerrr closed 4 years ago
@mjwwit apologies in advance, are you the person to reach out to see if this can be accepted?
I must have missed this PR... Thanks for the reminder! I like the idea, I'll test it later today and merge it if everything works out.
It works great, thanks!
DISCLAIMER: first time ever touching Go code, so feel free to request any updates to styling or the approach itself, or even do it yourself (I have enabled edits by maintainers).
It is required for the plugin to work correctly with Kubernetes runner, where environment variables are created before the pipeline is finished and thus initial DRONE_BUILD_STATUS is always "success".
Related discourse topic:
https://discourse.drone.io/t/drone-build-status-always-success-in-kubernetes/6627/2
Similar workaround in drone-slack:
https://github.com/drone-plugins/drone-slack/blob/59d3676b1cb7dbbdd9ca4b677570cd510ed8929a/main.go#L187-L189