gitlab+jenkins+maven+docker持续集成(四)——Extended E-mail Notification配置
构建后进行邮件通知,这里我们用Extended E-mail Notification
系统管理-->Extended E-mail Notification
在这里subject、content为defalut 模板,我们暂不做配置,我这里按项目进行配置
Extended E-mail Notification 邮件模板见下:
Content Type: HTML(text/html)
Default Subject
1
|
构建通知:$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
Default Content
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<b style= "font-size:12px" >(<span style= "color:red" >本邮件是程序自动下发的,请勿回复< /span >)<br>< /b ><hr>
<b style= "font-size: 12px;" >项目名称:$PROJECT_NAME<br>< /b ><hr>
<b style= "font-size: 12px;" >构建编号:$BUILD_NUMBER<br>< /b ><hr>
<b style= "font-size: 12px;" >GIT版本号:${GIT_REVISION}<br>< /b ><hr>
<b style= "font-size: 12px;" >构建状态:<span style= "color:red" >$BUILD_STATUS< /span ><br>< /b ><hr>
<b style= "font-size: 12px;" >触发原因:${CAUSE}<br>< /b ><hr>
<b style= "font-size: 12px;" >构建日志地址:<a href= "${BUILD_URL}console" >${BUILD_URL}console< /a ><br>< /b ><hr>
<b style= "font-size: 12px;" >构建地址:<a href= "$BUILD_URL" >$BUILD_URL< /a ><br>< /b ><hr>
<b style= "font-size: 12px;" >变更集:${JELLY_SCRIPT,template= "html" }<br>< /b ><hr>
|
配置后一定要选择Triggers,
这样配置后构建成功与失败都会收到邮件
本文转自 jackjiaxiong 51CTO博客,原文链接:http://blog.51cto.com/xiangcun168/1958579