Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sampathshivakumar/e3b88db42e8f03714b823ed21617d32f to your computer and use it in GitHub Desktop.
Save sampathshivakumar/e3b88db42e8f03714b823ed21617d32f to your computer and use it in GitHub Desktop.

Integrating Jenkins with Slack Notifications.

slack

Prerequisites:

  • A Jenkins Server which is up and running.
  • A Slack Account.

You can see Jenkins Step by Step Installation here. https://gist.github.com/sampathshivakumar/54449ea95540ad0fd0f0cf44beb54ff9

You can sign up for a Slack account here. https://slack.com/intl/en-in/

Lets signup for a account 1st.

1

Signup with gmail and click Confirm.

2

Now Create a Workspace.

3

Enter The Name Of Workspace and click Next.

4

Enter your Name and click Next.

5

Can Add Team Members To Work on DevOps Workspace or Skip for now.

6

Enter Channel Name and Click Next.

7

Clich On Lets Go.

8

Click The 3-Vertical Dots.

9

Select Apps.

11

Search for Jenkins CI then Add.

12

New Tab will Open, Click Add To Slack.

13

Choose A Channel Name Where You Want To Get Notifications.

14

Click Add Jenkins CI Integration.

15

You Will Get Set-Up Instructions, Just Follow It.

16

In your Jenkins Dashboard, Click on Manage Jenkins.

17

Click on Manage plugins and search for Slack notification in the Available tab. Click the tick box and install the plugin.

18

Once it’s installed, click on Manage Jenkins then go to Configure system.

19

Find the Slack section and add the following values as per Your Set-Up Instructions.

20

Below are My Values as per my Set-Up Instructions

16

Add Team subdomain value in Workspace then Click on Add and Jenkins.

21

Select Kind to Secret Text.

22

Add Integration token credential ID in Secret, Then Add Description and Click Add.

24

Now Click on Credential and Select Your Saved Key.

25

Click on Test, You Should See Success, Then Click Apply and Save.

26

Integration is Successful, You Can See The url of Jenkins Server.

27

Lets Test By Building a Job on Jenkins.

28

Create a Test-Project of Freestyle Project and Click Ok.

29

Select Build Step.

30

Select Execute Shell.

31

Enter echo "Hello-World".

32

Go to Post Build Actions, Select Slack Notifications.

33

Select All Available Options, Then Click Apply and Save.

34

You Can See No Notifications in Slack.

36

Now Click On Build Now.

35

Build-1 Success.

37

38

We Can See Build Notifications on Slack.

39

We have Successfully Integrated Jenkins Pipeline with Slack Notifications.

Thank you for reading this post! I hope you found it helpful. If you have any feedback or questions,Please connect with me on LinkedIn at https://www.linkedin.com/in/sampathsivakumar-boddeti-1666b810b/. Your feedback is valuable to me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment