The CI/CD and DevOps Blog

Learn about various tried-and-tested strategies that will help you ship code faster

Notifying Continuous Integration failure/success status on Email & Slack

Notifications are particularly useful when you start hitting scale with the number of software projects that are being worked on in parallel. Having the flexibility to configure the Continuous Integration platform to be notified for different scenarios becomes critical, in my opinion, in helping to reduce technical debt

At Shippable, we use Slack extensively for our internal communications. It allows us to be more efficient, communicate faster and have targeted discussions. One of the scenarios we use Slack is to monitor and discuss build issues based on the build status of critical projects. An example shown below.

 

In this tutorial, I'll pick three scenarios and go over configuring notifications for a Continuous Integration project status on email and Slack. First I'll go over the basics of the shippable.yml file configuration for email/Slack notifications. Then I'll cover the scenarios for email and Slack.

Configuring a build badge for a Node.js project status


I have gone through the steps of running  basic Continuous Integration (CI) on a Node.js app hosted on a private repository. Now I'll configure a visual indicator to display the status of the Node.js app when CI is run, using build badges. As shown below, I use it to update my team mates about the latest build status of my project in a convenient way.

First, what is a Badge and where is it used?

Badges, in the context of continuous integration, are used to display the meta-data of a build. For example, at the completion of a build, a status is displayed on whether a build succeeded or failed. This build status is incorporated into a build badge and can be displayed to viewers in different ways and in different locations. Badges are used to display different meta-data such as build status, code coverage percentage, status of third party dependencies, release versions, etc.

In this tutorial, I'll configure the Node.js app on Shippable to embed build status in two ways and show few examples of the outcome.

Get started with HipChat notifications and Bitbucket pull request status

We are very excited to announce major enhancements to our integration with two popular Atlassian products -  HipChat and Bitbucket pull request status.

First, we have added support for viewing build status for your Bitbucket pull requests from within the Bitbucket UI. In addition to firing CI for commits, Shippable builds your pull requests and shows you the results within the Bitbucket UI, so that you can merge the Pull Request confidently. More on this, including screenshots, is explained in our documentation

Second, you can now send HipChat notifications for your Shippable builds and pipeline updates.

How To: Use Slack Integration for Build Notifications

Warning-Icon.png

DEPRECATED BLOG:

We have significantly updated the Shippable platform with several new features. Hence most of the content in this blog is deprecated. Go to the updated blog for this topic. For the latest information, refer to our documentation and/or open a support issue, if you have questions.


 

 

400x400_slack

Shippable uses Slack on a daily, continuous basis for all team communication. Why, you ask? Because it allows us to "work in the moment". We have found it to be significantly more efficient, more transparent and faster to communicate using Slack. And less email!

And so, enabling Slack integrations for Build Notifications is special and personal and ... you get the point. Of course, this has also been something our customers have also been asking for!

This blog walks you through the exercise of setting up the Slack integration on Shippable through a simple 3-step process.