During my conversations with customers I usually get asked if Microsoft Teams support Jenkins, what all Jenkins notifications can be configured in teams and how does Jenkins notifications look in Teams. So, I decided to write up this article to explain how to configure Jenkins notifications in Teams.

 

Jenkins is one of the leading open-source continuous integration tool used for staying up to date on build related activities. Microsoft Teams is growing in DevOps space with over 60+ DevOps apps in its app store. Using both of these great software tools together have potential to bring efficiencies in your build workflow by keeping you always up to date on your build activities.

 

Jenkins connector in Microsoft Teams sends notification about build-related activities to whichever channel the connector is configured. Below is the list of build activities that you can be notified against:

  • Build Start
  • Build Aborted
  • Build Failure
  • Build Not Built
  • Build Success
  • Build Unstable
  • Back To Normal
  • Repeated Failure

 

Adding Jenkins Connector in Teams

Go to connectors gallery by clicking ‘…’ next to the channel name. Add Jenkins connector and once the connector is installed, name the connector according to your needs and once the notifications are generated, you’ll see them coming from the Jenkins connector you just named.

 

Jenkins_ConfigureTeams.png

 

Copy the webhook url shown on the config experience page as you would need to enter this webhook url on Jenkins portal to configure your build notifications.

 

Configuring webhook in Jenkins

‘Office 365 Connector’ on the Jenkins portal needs to installed if not installed already. To install the connector go to ‘Manage Jenkins’  -> ‘Manage Plugins’ -> ‘Available’ section. Select and install ‘Office 365 Connector’ from the list. While installing the connector select ‘Install without restart’ option.

 

Once the connector is installed, setup the webhook copied from Microsoft Teams to start getting the notifications in the channel. Go to the Jenkins project you created and go to ‘Configure’ section. Once in ‘Configure’ view, go to ‘Office 365 Connector’ section and ‘Add Webhook’. Paste the URL copied from Microsoft Team, name your webhook and go to ‘Advanced’ section for the webhook and check all the notification boxes for which you want to receive events and save the webhook.

 

Jenkins_Webhook_NotificationSelection.jpg

 

Now whenever you kick off the build, you’ll see notifications in the Teams channel based what notifications you have configured. Below is the example of Jenkins notifications once received in Teams channel

 

Jenkins_BuildNotification.png