Follow these steps to receive Jenkins notifications in Rocket.Chat using the Jenkins app from the Rocket.Chat marketplace:
1. Install the Jenkins app in Rocket.Chat
Go to Administration > Apps > Marketplace, and search for Jenkins
Install the app
Click the Settings tab and configure the following:
Enter a name in the Jenkins Integration Username Alias field
Add a user avatar in the Jenkins Integration Avatar field
Save the changes
2. Interact with the Jenkins App using slash commands
After installing the Jenkins app, you can connect your Rocket.Chat workspace to Jenkins using slash commands:
Ensure you have a Jenkins job set up
Navigate to the channel where you want to receive Jenkins notifications
Run the
/jenkins
slash command to view available actions with the Jenkins appRun the following command in the channel:
/jenkins connect <project URL>
Copy the job URL you created earlier in Jenkins and substitute it for <project URL>. Once executed, the Jenkins app will provide additional steps, including a webhook URL for completing the integration.
3. Configure the webhook in Jenkins
Log in to your Jenkins dashboard
Navigate to Dashboard > Manage Jenkins > Plugins and install the Outbound Webhook for Build Events plugin
In the already-created job:
Go to the Post-Build Actions section
Select Outbound Webhook Notification and add the webhook URL provided by the Jenkins app in the Rocket.Chat channel
Choose the types of notifications you want to receive in the Rocket.Chat channel.
Save the changes.
4. Receive Jenkins notifications in Rocket.Chat
You'll receive build status notifications when the configured Jenkins job runs in the designated Rocket.Chat channel. Notifications will include updates on build success or failure, helping your team stay informed and responsive.