Jenkins app for Google Chat

To get notifications about your Jenkins builds, use the Jenkins app in Chat.

Before you begin

Step 1: Install Chat plugin on Jenkins server

To do this task, you must sign in as a Jenkins administrator.

  1. On your device, download the Chat Notifier Plugin file.
  2. In “Jenkins,” select Manage Jenkins and then Manage Plugins.
  3. On the “Advanced” tab, under “Upload Plugin,” select the plug-in file.
  4. Click Upload.

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

Step 2: Set up the Jenkins app in Chat

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

  1. Open Google Chat.
  2. Open a direct message or go to a space.
  3. Copy the token in the app.
  4. (Optional) To display the token again, select 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

  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 .
  4. Choose which notifications you want to get.
  5. Under “Post-build Actions,” next to “Add post-build actions,” click the Down arrow .
  6. Select Notify Hangouts Chat.
  7. Choose an option and paste the token you copy from Chat.
    • Chat: Choose a global configuration that you previously set up.
    • Chat Token: Override the global configuration for a specific Chat space.
  8. Check the boxes for the items that you want to get notifications about in Chat.
  9. Click Save.

From a Build event notification, click:

  • Open Build: This modifies the build configuration in Jenkins.
  • View Details: This lets you view information about the notification.

Step 4: 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

    Tip: Make sure to replace {your_jenkins_token} with the token you requested from the Chat app. You can set threadByJob to true or false.

  4. Click Save.

Using the app in spaces

To use the app in spaces, you must @mention the app in each message to the app and 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. You can also type /jenkins_ and select the desired command from the dropdown.

Triggering builds from Chat

  1. In a space with Jenkins installed, or in a Jenkins direct message, enter /jenkins_triggerJob.
  2. In the dialog that opens, fill in the required fields: "Jenkins URL," "Job Name," "UserName" and "ApiToken."
  3. Click Submit.

Optionally, you can select whether you want to store your token (it will never be shown) and pass optional parameters to your build request.



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.

Search
Clear search
Close search
Main menu
1862768881671668947
true
Search Help Center
true
true
true
true
true
1026838
false
false