Message notification

Updated at: 2025-03-27 08:11

This topic describes the message notification plug-in of pipelines. This plug-in is primarily used for message notifications during pipeline execution, triggering third-party system webhooks, and other related features.

Go to the pipeline editing page and create a job. In the job editing panel, click Add Plugin. The following options are supported: Dingtalk Robot Notification, Email Notification, Webhook Notification, Wechat Robot Notification, and Lark Robot Notification.image

DingTalk robot notification

  1. Prerequisite: You have joined a DingTalk group with a configured webhook robot.

  2. Configure the message notification plug-in for a pipeline: Copy the robot webhook URL and paste it into the Webhook Url field in the Job Plugin section.

    1. Copy and paste the DingTalk robot webhook URL.

    2. If the signature verification feature is enabled for the DingTalk robot, copy and paste the signing key into the Secret field.

    3. Select the running status. When the pipeline job enters the selected status, a message notification is triggered.

    4. Select the notification content. The selected notification content is automatically added to the push message.

    5. You can enter custom message content, reference environment variables such as ${CI_COMMIT_TITLE}, and use the DingTalk Markdown syntax.

    6. You can enter mobile phone numbers in the @Mobile field to mention the related members in the DingTalk group. Separate multiple phone numbers (DingTalk phone numbers) by using commas (,). You can also enter all to mention everyone in the DingTalk group.

    image

  3. Run the pipeline. When the pipeline job enters the status that you configured for the message notification plug-in, a message notification is sent to the DingTalk group.

Email notification

  1. Configure the message notification plug-in for a pipeline: In the job editing panel, click Add Plugin and select Email Notification. In the Emai Notification section, enter the email address, and specify the Run Status parameter.

    image

  2. Run the pipeline. When the pipeline job enters the status that you configured for the message notification plug-in, a message notification is sent to the Email address.

Webhook notification

  1. Prerequisite: The webhook URL must be accessible from the Internet.

  2. Configure the message notification plug-in for a pipeline: In the job editing panel, click Add Plugin and select Webhook Notification. In the Webhook Notification section, enter the webhook URL, and specify the Run Status parameter.

    image

  3. Run the pipeline. When the pipeline job enters the status that you configured for the message notification plug-in, a webhook request is initiated. Webhook requests sent by pipelines use the HTTP POST method. The payload contains the job status information. Sample code:

    {
      "event": 'task',
      "action": 'status',
      "task": {
        "pipelineId": 183,
        "pipelineName": 'test pipeline',
        "stageName": 'Build',
        "taskName": 'Build Java',
        "buildNumber": 19,
        "statusCode": 'SUCCESS', // UNKOWN, RUNNING, WAITING, CANCELLING, CANCELED,FINISH,SUCCESS,FAIL,SKIP  
        "statusName": 'Successfully run',
        "pipelineUrl": 'https://rdc.aliyun.com/ec/pipelines/156539?build=19',
        "message": '[test pipeline]Pipeline stage[Build]job[Build Java]successfully run'
      },
      "sources": [
        {
          "repo": 'git@gitlab:test.git',
          "branch": 'master',
          "commitId": 'xdfdfdff',
          "privousCommitId": 'ddddd',
        }
      ],
      "globalParams": [
        {"key": 'test', "value": 'test1'},
        {"key": 'test2', "value": 'test2'}
      ]
    }

WeChat robot notification

  1. Prerequisites: You have joined a WeChat group with a configured webhook robot.

  2. Configure the message notification plug-in for a pipeline: Copy the robot webhook URL and paste it into the Webhook Url field in the Job Plugin section.

    1. Copy and paste the WeChat robot webhook URL.

    2. Select the running status. When the pipeline job enters the selected status, a message notification is triggered.

    3. Select the notification content. The selected notification content is automatically added to the push message.

    4. You can enter custom message content, reference environment variables such as ${CI_COMMIT_TITLE}, and use the DingTalk Markdown syntax.

    5. You can enter user IDs in the @user_ID field to mention the related users in the WeChat group. Separate WeChat user IDs by using commas (,). You can also enter all to mention everyone in the WeChat group.

      • You can go to the WeCom management backend and obtain the user IDs from the contacts.

    image

  3. Run the pipeline. When the pipeline job enters the status that you configured for the message notification plug-in, a message notification is sent to the WeChat group.

Lark robot notification

  1. Prerequisite: You have joined a Lark group with a configured webhook robot .

  2. Configure the message notification plug-in for a pipeline: Copy the robot webhook URL and paste it into the Webhook Url field in the Job Plugin section.

    1. Copy and paste the Lark robot webhook URL.

    2. If the signature verification feature is enabled for the Lark robot, copy and paste the signing key into the Secret field.

    3. Select the running status. When the pipeline job enters the selected status, a message notification is triggered.

    4. Select the notification content. The selected notification content is automatically added to the push message.

    5. You can enter custom message content and reference environment variables such as ${CI_COMMIT_TITLE}.

    6. You can enter user IDs in the @user_ID field to mention the related users in the Lark group. Separate Lark user IDs by using commas (,). You can also enter all to mention everyone in the Lark group.

      • You can go to the Lark management backend and obtain the user IDs from the members and departments.

    image

  3. Run the pipeline. When the pipeline job enters the status that you configured for the message notification plug-in, a message notification is sent to the Lark group.

  • On this page (1)
  • DingTalk robot notification
  • Email notification
  • Webhook notification
  • WeChat robot notification
  • Lark robot notification
Feedback