-
Notifications
You must be signed in to change notification settings - Fork 723
/
Copy pathtext.jelly
98 lines (86 loc) · 4.06 KB
/
text.jelly
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
GENERAL INFO
BUILD ${build.result}
Build URL: ${rooturl}${build.url}
Project: ${project.name}
Date of build: ${it.timestampString}
Build duration: ${build.durationString}
<j:set var="changeSet" value="${build.changeSet}" />
<j:if test="${changeSet!=null}">
<j:whitespace>CHANGE SET </j:whitespace>
<j:set var="hadChanges" value="false"/>
<j:forEach var="cs" items="${changeSet}" varStatus="loop">
<j:set var="hadChanges" value="true"/>
<j:set var="aUser" value="${cs.hudsonUser}"/>
<j:whitespace>Revision ${cs.commitId?:cs.revision?:cs.changeNumber} by ${aUser!=null?aUser.displayName:cs.author.displayName}: (${cs.msgAnnotated}) </j:whitespace>
<j:forEach var="p" items="${cs.affectedFiles}">
<j:whitespace> change: ${p.editType.name} ${p.path} </j:whitespace>
</j:forEach>
</j:forEach>
<j:if test="${!hadChanges}">
<j:whitespace>No changes </j:whitespace>
</j:if>
</j:if>
<j:set var="artifacts" value="${build.artifacts}" />
<j:if test="${artifacts!=null and artifacts.size()>0}">
ARTIFACTS <j:forEach var="f" items="${artifacts}">
*${f}</j:forEach>
</j:if>
<j:set var="mbuilds" value="${build.moduleBuilds}" />
<j:if test="${mbuilds!=null}">
MAVEN ARTIFACTS<j:forEach var="m" items="${mbuilds}">
${m.key.displayName}
<j:forEach var="mvnbld" items="${m.value}">
<j:set var="artifacts" value="${mvnbld.artifacts}" />
<j:if test="${artifacts!=null and artifacts.size()>0}">
<j:forEach var="f" items="${artifacts}">
*${f}
</j:forEach>
</j:if>
</j:forEach>
</j:forEach>
</j:if>
<!-- JUNIT TEMPLATE -->
<j:set var="junitResultList" value="${it.JUnitTestResult}" />
<j:if test="${junitResultList.isEmpty()!=true}">
JUNIT RESULTS
<j:forEach var="junitResult" items="${it.JUnitTestResult}">
<j:forEach var="packageResult" items="${junitResult.getChildren()}">
Name: ${packageResult.getName()} Failed: ${packageResult.getFailCount()} test(s), Passed: ${packageResult.getPassCount()} test(s), Skipped: ${packageResult.getSkipCount()} test(s), Total: ${packageResult.getPassCount()+packageResult.getFailCount()+packageResult.getSkipCount()} test(s)<j:forEach var="failed_test" items="${packageResult.getFailedTests()}">
Failed: ${failed_test.getFullName()}</j:forEach>
</j:forEach>
</j:forEach>
</j:if>
<!-- COBERTURA TEMPLATE -->
<j:set var="coberturaAction" value="${it.coberturaAction}" />
<j:if test="${coberturaAction!=null}">
<j:set var="coberturaResult" value="${coberturaAction.result}" />
<j:if test="${coberturaResult!=null}">
COBERTURA RESULTS
${coberturaResult.getName()}
<j:forEach var="key" items="${coberturaResult.getResults().keySet()}">
${key} ${coberturaResult.getResults().get(key)} (${coberturaResult.getResults().get(key).getPercentage()}%)
</j:forEach>
By packages
<j:forEach var="child" items="${coberturaResult.getChildren()}">
${coberturaResult.getChild(child).getName()}
<j:forEach var="childkey" items="${coberturaResult.getChild(child).getResults().keySet()}">
${childkey} ${coberturaResult.getChild(child).getResults().get(childkey)} (${coberturaResult.getChild(child).getResults().get(childkey).getPercentage()}%)
</j:forEach>
</j:forEach>
</j:if>
</j:if>
<!-- WARNINGS-NG REPORT -->
<j:set var="aggregationAction" value="${it.getAction('io.jenkins.plugins.analysis.core.model.AggregationAction')}" />
<j:if test="${aggregationAction!=null}">
<j:whitespace>${aggregationAction.getDisplayName().toUpperCase()} </j:whitespace>
<j:forEach var="tool" items="${aggregationAction.getTools()}">
<j:whitespace>Tool: ${tool.getName()} </j:whitespace>
<j:whitespace>Report: ${tool.getLatestUrl()} </j:whitespace>
<j:whitespace>Low: ${tool.getLowSize()}, Normal: ${tool.getNormalSize()}, High: ${tool.getHighSize()}, Error: ${tool.getErrorSize()} </j:whitespace>
<j:whitespace> </j:whitespace>
</j:forEach>
</j:if>
</j:jelly>