We know that we can setup various monitoring alerts to teams channel. Similarly we can setup the events happening in Bit-Bucket to teams channel too. Today we are going to learn how we can achieve it. Let’s get into it.
Prerequisites:
- Admin privileges to teams channel
- Admin privileges to Bit-Bucket
To setup the notification to teams, there is a built in plugin in Bit-Bucket. Firstly what we have to do is install “Microsoft Teams Bitbucket Connector”. With this installed, we can set up rules to get notification to the teams channel.
But before that, we have to create an incoming webhook for the teams channel. For adding the webhook
- Go to your teams channel
- Click on connectors
3. Search incoming webhook and click add
4. Then click configure and give a name for your webhook and click create
5. A URL will be created, copy that URL and keep it somewhere as we need that to setup the plugin.
Next, let’s get into the plugin installation and configuration.
In order to install Microsoft Teams Bitbucket Connector, follow these steps
- Login to your Bit-Bucket
- Go to Workspace settings
- Go to Marketplace
- Search for Microsoft Teams Bitbucket Connector and click add
Next, let’s configure the Plugin and rule for the notifications to teams channel.
- Go to your repository.
- Go to repository settings
- Scroll down on the dashboard and you can see a settings options under Microsoft Teams Bitbucket Connector. Click on that.
- Click Create
5. Fill the configuration information like name, the webhook URL etc
6. Then specify the events in which you need to get notified.
7. This is just an example, select the events as per your requirement.
8. Finally Select expected commit statuses as per your requirement
That’s it, you have successfully configured notification to teams channel from Bit-Bucket repo. You can test it by triggering an event that you have specified in the rule and check your teams channel.