Google Hangouts is being replaced by Google Chat. Learn about the switch from Google Hangouts to Google Chat.

Jenkins app for Google Chat

Use the Jenkins app in Chat to get notifications about your Jenkins builds.

Before you begin

  • You need permission from your Google Workspace administrator to install apps.
  • You need to add the app to Chat.
    Learn how to find apps and add them to Chat.

Step 1: Install Chat plugin on Jenkins server

You must sign in as a Jenkins administrator to do this task.

  1. Download the Chat Notifier Plugin file.
  2. In Jenkins, go to Manage Jenkinsand thenManage Plugins.
  3. On the Advanced tab, under Upload Plugin, select the downloaded plug-in file from step 1 and click Upload.

People in your organization can now install and set up the Jenkins app.

Step 2: Set up the Jenkins app in Chat

Jenkins needs the token that the app generates to send build notifications to Chat. Each space that you add the app to gets a token. The app sends notifications to all spaces where it's a member.

  1. Open Chat.
  2. Open a direct message with the app or go to a space with the app.
  3. Copy the token displayed by the app.
  4. (Optional) To display the token again, choose an option:
    • In a direct message, enter token
    • In a space, enter @Jenkins token.
  5. (Optional) To regenerate the token, click Regenerate Token.

Step 3: Set up notifications

Get notifications for a build

  1. Open Jenkins.
  2. Go to the build that you want to add Chat notifications for.
  3. Under Build, next to Add build step, click the Down arrow "" and choose what to get notifications for, such as the build result.
  4. Under Post-build Actions, next to Add post-build actions, click the Down arrow "" and select Notify Hangouts Chat.
  5. Choose one of the following options and paste the token that you copied from Chat.
    • Chat—Choose a global configuration that you previously set up.
    • Chat Token—Override the global configuration for a specific Chat space.
  6. Check the boxes for the items that you want to get notifications about in Chat.
  7. Click Save.

You get notifications in Chat about build events, such as start, failure, and success. From a notification, you can click:

  • Open Build—Modify the build configuration in Jenkins.
  • View Details—View information about the notification.

Get notifications for a pipeline

  1. Open Jenkins.
  2. Open the pipeline that you want to add Chat notifications for.
  3. In your pipeline script, enter:

    hangoutsNotify message: "This message is from a pipeline!",token: "your_jenkins_token",threadByJob: false

    Note: In the above text, replace your_jenkins_token with the token that you copied above. You can set threadByJob to true or false.

  4. Click Save.

Using the app in spaces

To use the app in spaces, you need to explicitly @mention the app in each message to the app (including in replies to messages from the app). The @mention confirms you're sending the message to the app and not to others in the space.



Google, Google Workspace, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
1026838
false
false