Configure mail, two ways
Elementary: System Management -> System Configuration -> Email Notification (System Administrator Email Address)
Advanced: Extended E-mail Notification
Under normal circumstances, the deployment process is roughly like this. All test environment permissions are released and then built and debugged by developers and testers. For pre-release online environments, testers will send notification emails to O&M after testing. , Operation and maintenance for deployment, and reply to the email after the deployment is completed. However, sometimes you may forget to return the email after the deployment, so it is also necessary to configure the Jenkins build email notification.
1. Global configuration
Also click on the "System Management" menu on the left, select "System Settings" on the right, and find Extend E-mail Notification for global configuration.
Also fill in the SMTP Server information. Click "Advanced" to configure SMTP authentication, configure the user name, password and other information of the sender.
The default recipient fills in the person who needs to send email notification, if there are more than one, separate it with a space
Click the "Default Triggers..." button in the bottom right corner to set the default events that trigger email notifications.
Check the events that need to trigger email notifications based on the actual situation.
After saving the global configuration information, go to the project to configure the project.
(1) System Management -> System Configuration
Configure email address and password
Set Default Triggers, if the build fails or there is a problem with the return status code, an email alert will be sent
The following is the primary system mail configuration
2. Project configuration
Enter the specific project configuration interface and click "Configure", in the configuration interface click "Add post-build operation steps", select "Editable Email Notification"
Just save the default in the settings.
You can customize the configuration for this item in "Advanced Settings".
You can define the recipient list, subject, content, attachments, etc. of the project notification for the project.
Click Save after setting. You can go to verify whether you can email notifications.
After the test project is built, the mail receiver configured by Jenkins can receive the mail notification of the construction information normally
The test build is executed successfully without sending an email
The test build fails, whether to send an email, write the command wrong first
Related Reading:
1. Complete binary installation of Kubernetes high-availability cluster
2. Binary installation of Kubernetes high-availability cluster (on)