Over a million developers have joined DZone.

How to Get Slack Notifications for New Active Sprints

DZone's Guide to

How to Get Slack Notifications for New Active Sprints

In this article, Denny Zhang explains how to set up Slack to give you notifications about new active Sprints. Read on to learn more!

· Integration Zone
Free Resource

Learn how API management supports better integration in Achieving Enterprise Agility with Microservices and API Management, brought to you in partnership with 3scale

Following Git workflows, there is a branch called activesprint or develop. It is the release candidate. Most active branches should base on it.

Teams need to be notified whenever a new activesprint branch has been created. To lower the communication effort, we can automate the detection process and get Slack notifications.

Image title

Why We Need Slack Notifications

For one, when a new active Sprint is created, we usually need to merge our private branches as soon as possible. The earlier we do the branch merge, the less merge effort we should expect.

Secondly, config files might need to be updated accordingly (especially the bump version).

Backbone: Jenkins and Slack

First of all, we need to detect when a new Git branch has been created.

We have two ways: push or poll. If we have the admin privilege of Git repo, we can define a Git hook. The hook subscribes to the Git branch to create an event. Or, we can define a crontab, which will periodically poll latest branch list of Git ls-remote –heads origin.

Fortunately, activesprint usually has a strong naming convention (say sprint-37/sprint-38 or 1.37/1.38). Once we figure out latest branch list, we can easily detect whether a new activesprint branch has been created.

For a bigger adoption, we use the poll mechanism:

Image title

Here comes a Jenkins job, MonitorNewActiveSprintin GitHub. We can also find a live version in our public demo on Jenkins.

Whenever we detect a new activesprint, we fail the job and it sends out Slack notifications.

Image title

This is how the Jenkins job looks:

Image title

Once we have it properly configured, we will get a lovely Slack notification:

Image title

Any improvements or suggestions? Share your experience!

Check out the original article here.

Unleash the power of your APIs with future-proof API management - Create your account and start your free trial today, brought to you in partnership with 3scale.

slack ,sprints ,integration

Published at DZone with permission of Denny Zhang, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}