Windows版,修改端口

C:\Program Files\Jenkins\jenkins.xml

找到端口位置修改即可

Jenkins端口及邮件配置_Jenkins

然后重启Jenkins服务

Jenkins端口及邮件配置_Windows_02

邮件配置

先添加SMTP账户: Manage Jenkins --> Credentials --> System --> Global credentials (unrestricted)

Jenkins端口及邮件配置_Windows_03

Jenkins端口及邮件配置_端口_04

Add Credentials

Jenkins端口及邮件配置_Windows_05

Manage Jenkins --> System

Extended E-mail Notification

Jenkins端口及邮件配置_Windows_06

然后添加邮件服务器信息

Manage Jenkins --> System

此处admin email为邮件服务器email账户,而不是接收告警邮件的email地址

Jenkins端口及邮件配置_Jenkins_07

接收邮件告警地址填在Recipient 处

Jenkins端口及邮件配置_Windows_08


build project添加邮件告警,在build step最后添加 Post-build action --> Email Notification

Jenkins端口及邮件配置_端口_09