bitrise-steplib / steps-slack-message

Send a Slack message
MIT License
14 stars 34 forks source link

Abillity to send slack message only on status change #2

Closed ritave closed 6 years ago

ritave commented 8 years ago

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.

viktorbenei commented 8 years ago

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.

ritave commented 8 years ago

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

viktorbenei commented 8 years ago

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

yas375 commented 8 years ago

+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!

kensykora commented 7 years ago

+1, this would be great.

viktorbenei commented 7 years ago

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

viktorbenei commented 7 years ago

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

gheine commented 7 years ago

+1 please consider adding this!

viktorbenei commented 7 years ago

@gheine isn't https://github.com/bitrise-io/steps-slack-message/issues/2#issuecomment-272622607 enough?

rajit commented 7 years ago

https://discuss.bitrise.io/t/check-if-last-build-failed-status-changed-e-g-only-slack-notify-if-build-failed-or-fixed/1781

This is open for more than a year. Is it any closer to being supported?

viktorbenei commented 7 years ago

@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 6 years ago

+1 here too!

viktorbenei commented 6 years ago

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! :)