Integrating Jenkins with Slack Notifications
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.
Integration Jenkins with slack
First, we need to configure slack on our machine.
- Create a slack account: https://slack.com/
- configure the Jenkins integration: https://myspace.slack.com/services/new/jenkins-ci
First, install ‘Jenkins-ci’ and then Add configuration and set channel and all thing like
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.
Select Slack Notifications plugin
and click on Install without restart
button.
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.
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.
Test setup
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.
Thank you for reading, if you have anything to add please send a response or add a note!