bitrise-steplib/steps-slack-message

Abillity to send slack message only on status change

ritave opened this issue · 13 comments

For example I'd like to have nightlies, and expect them to suceed 99% of the time, no need to spam my channel each night. But I'd like to be notified when the build fails. So I would love to have this step send message only on build status being different then the last one.

Great idea! Unfortunately this can't be done right now, as there's no Environment Variable or API to get the previous build's status - but this can be fixed ;)

Could you please create a UserVoice feature request to have this information as EnvVar? Probably it should include more than one EnvVars, to be able to get the previous build's status on the same branch, or just the absolute last build's status (which might be on another branch).

IMO this can be related to this request: https://bitrise.uservoice.com/forums/235233-general/suggestions/6901955-add-previous-commit-message-support-to-git - if you want to you can upvote that one and add a comment about the status env. It would work similar to what it's described in this request, just not for commit hashes but for build statuses.

I voted and linked back to this issue from the UserVoice you posted

Thanks, I changed the title of the request to better reflect the fact that it shouldn't be just git info ;)

+1

We have a few people on the team. We are interested in getting Slack message in our team's channel whenever build fails and then when it becomes green again. There is no value for us in having repetitive messages that the build has passed every time someone pushes.

Thanks in advance!

+1, this would be great.

Feel free to create a feature request at: https://discuss.bitrise.io/c/feature-requests , for better visibility ;)

Btw, if all you want to do is "I'd like to be notified when the build fails." it's already possible, see: http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/#run-a-step-only-if-the-build-failed

+1 please consider adding this!

@rajit not yet, not enough attention - thanks for creating the feature request on discuss, if it gets enough votes there we'll definitely bump the priority!

gcamp commented

+1 here too!

Closing this thread here as there's a feature request for it - please vote & comment for it at: https://discuss.bitrise.io/t/check-if-last-build-failed-status-changed-e-g-only-slack-notify-if-build-failed-or-fixed/1781

Thank you! :)