Integrating Jenkins with Slack Notifications

Prashant Bhatasana
Jun 15, 2018 · 3 min read
Image for post
Image for post

Jenkins is an open-source continuous integration software tool written in the Java programming language for testing and reporting on isolated changes in a larger code base in real-time. The software enables developers to find and solve defects in a code base rapidly and to automate testing of their builds.

So How automation build environment to run build every single push happens on the source repository we need to broadcast the status of the build to the team members will ensure code base sanity.

This blog will help you to set up a continuous integration environment using Jenkins with slack for notifications.

Here Are some steps you need to follow to set up Jenkins that we discuss in our previous blog.

First, we need to configure slack on our machine.

  1. Create a slack account: https://slack.com/
  2. configure the Jenkins integration: https://myspace.slack.com/services/new/jenkins-ci
Image for post
Image for post

First, install ‘Jenkins-ci’ and then Add configuration and set channel and all thing like

Image for post
Image for post
Add channel name here and note Token.
Image for post
Image for post
Then scroll down and click on save setting button.

After that, we need to set configuration on Jenkins Slack Notifications plugin.

For Jenkins to notify slack, we need to install in Jenkins. By now, you must know how to do this, so go ahead and install the plugin.

Image for post
Image for post

Select Slack Notifications plugin and click on Install without restart button.

Image for post
Image for post
It displays success with the plugin install successfully.

Then go to Jenkins job if you have no job then you need to create one job and go to the post-build section. Select Slack Notification` and it’s display Slack Notification` wizard.

Image for post
Image for post

Enter Base URL, Team subdomain, Integration Token that created on you slack and Project Channel and click on apply and save button.

And also for Integration Token, It’s recommended is to configure credentials for your Integration Token. Just add credentials (Secret text) and define your token.

Now we can finally test our current setup. We can run the Jenkins job.

based on your build result it sends slack notifications like here.

Image for post
Image for post

Thank you for reading, if you have anything to add please send a response or add a note!

AppGambit

AWS Consulting Partner | Web and Mobile Development Co Based in India

Prashant Bhatasana

Written by

Test Automation Engineer, Love to automate the Web, Mobile and make Testing Frameworks with #AWS #Terraform #Jenkins #Ansible #Docker #Selenium #Protractor

AppGambit

AppGambit

AWS Consulting Partner | Full-stack Web/Mobile, Serverless, Cloud Native Development and Consulting Agency.

Prashant Bhatasana

Written by

Test Automation Engineer, Love to automate the Web, Mobile and make Testing Frameworks with #AWS #Terraform #Jenkins #Ansible #Docker #Selenium #Protractor

AppGambit

AppGambit

AWS Consulting Partner | Full-stack Web/Mobile, Serverless, Cloud Native Development and Consulting Agency.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store