I’ve set up a Slack integration for GitLab. I’d like build/deployment failure notifications (only on “main” branch) to go into a Slack channel.
I logged in as Admin, went to the project–>Settings–> Integrations–>Slack
The integration is active, and I’ve ticked “Notify only broken pipelines”. Branch for which notifications are to be sent is main.
When I test the integration, it does send a message to Slack but when a pipeline fails, no notification goes to the Slack channel.
What am I missing?
Hi, from the docs: Slack notifications service | GitLab
Did you configure labels to be notified or left this blank? Leaving blank should mean it’ll send for all pipelines then.
The troubleshooting section in the link above could help as well. Channels can’t be private or usernames (point 6 in the docs).
I only want the notifications to be sent on failures on main, so do I need to add “main” to labels?
The channel is private; I’m using Slack webhook, and for example, messages about opened MRs do go into the channel
No, you don’t need labels. The docs seem to say that private channels are not supported. I would try testing with a public channel, and see if it’s any better. That will at least confirm or not confirm what the docs say. At least for debugging purposes I would try that.