-
Notifications
You must be signed in to change notification settings - Fork 720
/
groovy-text.template
50 lines (46 loc) · 1.38 KB
/
groovy-text.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
GENERAL INFO
BUILD ${build.result ?: 'SUCCESSFUL'}
Build URL: ${rooturl}${build.url}
Project: ${project.name}
Date of build: ${it.timestampString}
Build duration: ${build.durationString}
<%
def changeSets = build.changeSets
if(changeSets != null) {
def hadChanges = false %>
CHANGE SET
<% changeSets.each() { cs_list ->
cs_list.each() { cs ->
hadChanges = true %>
Revision <%= cs.metaClass.hasProperty('commitId') ? cs.commitId : cs.metaClass.hasProperty('revision') ? cs.revision :
cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" %> by <%= cs.author %>: (<%= cs.msgAnnotated %>)
<% cs.affectedFiles.each() { p -> %>
change: <%= p.editType.name %> <%= p.path %>
<% }
}
}
if(!hadChanges) { %>
No changes
<% }
} %>
<%
try {
def aggregationAction = it.getAction("io.jenkins.plugins.analysis.core.model.AggregationAction")
if ( aggregationAction != null ) { %>
${aggregationAction.getDisplayName().toUpperCase()}
<% aggregationAction.getTools().each {
tool -> %>
Tool: ${tool.getName()}
Report: ${tool.getLatestUrl()}
Low: ${tool.getLowSize()}, Normal: ${tool.getNormalSize()}, High: ${tool.getHighSize()}, Error: ${tool.getErrorSize()}
<% }
}
} catch(e) {
// we don't do anything
} %>
<% if(build.result==hudson.model.Result.FAILURE) { %>
CONSOLE OUTPUT
<% build.getLog(100).each() { line -> %>
${line}
<% }
} %>