5.jenkins using email Extension plugin plugin to configure email notifications

Source: Internet
Author: User

Jenkins comes with the ability to email notifications

The Mail notification module in System administration –> system settings can configure mail notifications and configure the system administrator mailbox in Jenkins location before configuration.

Then configure the account password information for the administrator mailbox, such as

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/BD/wKiom1cHf2jzvmWNAACXJOIEfB0762.png "title=" Jenkins1.png "alt=" Wkiom1chf2jzvmwnaacxjoiefb0762.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/BD/wKiom1cHf3miftW6AAHVwvjwYys623.png "title=" Jenkins2.png "alt=" Wkiom1chf3miftw6aahvwvjwyys623.png "/>

Depending on the mailbox configuration you use, you can click "Test Configuration" to send a test message to the "Test e-Mail Recipient" configured mailbox after the configuration is complete.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/BD/wKiom1cHf4vA0DzNAABnIq6giis898.png "title=" Jenkins3.png "alt=" Wkiom1chf4va0dznaabniq6giis898.png "/>

Save configuration after successful test

Then change the project configuration to add "post-Build Action" –> "e-mail Notification"

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/BA/wKioL1cHgF2SUwSKAABizY6RitE129.png "title=" Jenkins4.png "alt=" Wkiol1chgf2suwskaabizy6rite129.png "/>

In the module "Recipients" filled in the mail recipient's email address, multiple mailboxes are separated by commas, save the configuration

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/BE/wKiom1cHf8jR5A06AAD1isWSCTU260.png "title=" Jenkins5.png "alt=" Wkiom1chf8jr5a06aad1iswsctu260.png "/>

This will send an email notification to the specified mailbox each time the build matches the following conditions

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/BF/wKiom1cHf-WS7zlfAAKHCOoKEoA828.png "title=" Jenkins6.png "alt=" Wkiom1chf-ws7zlfaakhcookeoa828.png "/>

The system default email notification itself has many limitations, such as its mail notification does not provide detailed message content, unable to define the format of the sent message, the inability to define a flexible message receiving configuration, and so on.

In this case, we found the email Extension Plugin. This plugin allows you to customize every aspect of your email notification, such as when you send a message, you can customize who you send it to, what content you send, and so on.

Install the email Extension plugin plugin in the "System Management" and "management plug-in", the installation method is as described in the previous document installation method of plug-in

Configure email notification options after the plugin is installed in the "Extended e-mail Notification" module in "System administration" and "System settings"

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/BB/wKioL1cHgLCywZw_AAHt9QsOlSk485.png "title=" Jenkins7.png "alt=" Wkiol1chglcywzw_aaht9qsolsk485.png "/>650" this.width=650; "src=" http://s3.51cto.com/wyfs02/ M00/7e/c0/wkiom1chgblgrvo2aaczelgl5xc572.png "title=" Jenkins8.png "alt=" Wkiom1chgblgrvo2aaczelgl5xc572.png "/>

Default Recipients: Customizing the email recipient list

Reply to list: Reply list

Emergency Reroute: If this field is not empty, all e-mails will be sent separately to that address

Default Subject: A custom message notification that has a name for the theme.

Maximum Attachment Size: Maximum message attachment size.

Default content: Custom message notification defaults to the body.

Click the Advanced option under "Default Triggers" to select the default mail notification trigger

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/C1/wKiom1cHgDXhoLcrAABmdaws4xE770.png "title=" Jenkins9.png "alt=" Wkiom1chgdxholcraabmdaws4xe770.png "/>

Click "Save" when the above configuration is complete

Then in the project configuration, "add post-Build action steps" –> "Editable Email Notification" and configure

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7E/C2/wKiom1cHgEWj_QiwAAB_QMBGqPw376.png "title=" Jenkins10.png "alt=" Wkiom1chgewj_qiwaab_qmbgqpw376.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/C3/wKiom1cHgFujzleeAAC3qIauQl0923.png "title=" Jenkins11.png "alt=" Wkiom1chgfujzleeaac3qiauql0923.png "/>

These variables are either configured in the "System settings" or can be manually changed to the configuration you want

Click on "Advanced Settings ..."

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/C1/wKioL1cHgVTxEsfuAABXv3f4Voo433.png "title=" Jenkins12.png "alt=" Wkiol1chgvtxesfuaabxv3f4voo433.png "/>

you can add or remove mail notification triggers and each trigger trigger notification message the recipient

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/C1/wKioL1cHgXWxOR7kAABbGUzfyK8253.png "title=" Jenkins13.png "alt=" Wkiol1chgxwxor7kaabbguzfyk8253.png "/>

Click "Advanced ..." to customize the message recipients, title and content of each trigger individually

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/C5/wKiom1cHgNqQNpc7AAB-v1mOvxA621.png "title=" Jenkins14.png "alt=" Wkiom1chgnqqnpc7aab-v1movxa621.png "/>

Click "Save" after configuration is complete

After each build, the trigger that matches the message notification sends a notification message to the specified mailbox, depending on the status information of the build

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/C5/wKiom1cHgQKg1wX0AAEhJ4D05JU867.png "title=" Jenkins15.png "alt=" Wkiom1chgqkg1wx0aaehj4d05ju867.png "/>


This article is from the "Wandering Fish" blog, please make sure to keep this source http://faded.blog.51cto.com/6375932/1761858

5.jenkins Configuring email notifications using the email Extension plugin plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.