How to integrate Jenkins with Mattermost?

From PheonixSolutions
Jump to navigation Jump to search

Step 1:-

Create a new channel on mattermost

Step 2:-

Click on Main Menu > Integrations > Incoming Webhook > Add Incoming Webhook.

Note: admin access required to perform this step

Step 3:-

A URL will be generated. Copy the URL for further use.

Step 4:-

From the Jenkins Dashboard, navigate Manage Jenkins> Go to Plugins

Step 6:-

Click on Install without restart to install mattermost on jenkins

Step 7:-

Navigate Manage Jenkins > Configure System > Global Mattermost Notifier Settings.Paste the URL which we copied earlier at endpoint section

Step 8:-

Replace the Build Server URL with https://ci.pheonixsolutions.com

Step 9:-

Click on Test connection and check the success message as mentioned

Reference :https://mattermost.com/blog/getting-started-with-mattermost-integrations/

Step 10:-

Login Mattermost server

 ssh username@ip

Step 11:-

Follow the below command

cd /opt/mattermost/config
vi config.json

Edit the following lines

 "SMTPUsername": "mattermostadmin@pheonixsolutions.com",
 "SMTPPassword": "***********",
 "SMTPServer": "mail.pheonixsolutions.com",
 "SMTPPort": "25"