Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

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.

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:
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.

THE DZONE NEWSLETTER

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.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}