markus / MARKUS_html.template @ 9e758326
이력 | 보기 | 이력해설 | 다운로드 (8.72 KB)
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
---|---|
2 |
<html> |
3 |
<head> |
4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
5 |
<STYLE type="text/css"> |
6 |
BODY, TABLE, TD, TH, P { |
7 |
font-family: Calibri, Verdana, Helvetica, sans serif; |
8 |
font-size: 12px; |
9 |
color: black; |
10 |
} |
11 |
.console { |
12 |
font-family: Courier New; |
13 |
} |
14 |
.filesChanged { |
15 |
width: 10%; |
16 |
padding-left: 10px; |
17 |
} |
18 |
.section { |
19 |
width: 100%; |
20 |
border: thin black dotted; |
21 |
} |
22 |
.td-title-main { |
23 |
color: white; |
24 |
font-size: 200%; |
25 |
padding-left: 5px; |
26 |
font-weight: bold; |
27 |
} |
28 |
.td-title { |
29 |
color: white; |
30 |
font-size: 120%; |
31 |
font-weight: bold; |
32 |
padding-left: 5px; |
33 |
text-transform: uppercase; |
34 |
} |
35 |
.td-title-tests { |
36 |
font-weight: bold; |
37 |
font-size: 120%; |
38 |
} |
39 |
.td-header-maven-module { |
40 |
font-weight: bold; |
41 |
font-size: 120%; |
42 |
} |
43 |
.td-maven-artifact { |
44 |
padding-left: 5px; |
45 |
} |
46 |
.tr-title { |
47 |
background-color: <%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %>; |
48 |
} |
49 |
.test { |
50 |
padding-left: 20px; |
51 |
} |
52 |
.test-fixed { |
53 |
color: #27AE60; |
54 |
} |
55 |
.test-failed { |
56 |
color: #E74C3C; |
57 |
} |
58 |
</STYLE> |
59 |
</head> |
60 |
<BODY> |
61 |
<!-- BUILD RESULT --> |
62 |
<table width=100% style="border:1px dotted"> |
63 |
<tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> > |
64 |
<td style="padding-left: 5px; font-weight: bold;" colspan=2> |
65 |
<font color="white" size="5"> BUILD ${build.result ?: 'COMPLETED'} </font> |
66 |
</td> |
67 |
</tr> |
68 |
<tr> |
69 |
<td>URL:</td> |
70 |
<td><A href="${rooturl}${build.url}">${rooturl}${build.url}</A></td> |
71 |
</tr> |
72 |
<tr> |
73 |
<td>Project:</td> |
74 |
<td>${project.name}</td> |
75 |
</tr> |
76 |
<tr> |
77 |
<td>Date:</td> |
78 |
<td>${it.timestampString}</td> |
79 |
</tr> |
80 |
<tr> |
81 |
<td>Duration:</td> |
82 |
<td>${build.durationString}</td> |
83 |
</tr> |
84 |
<tr> |
85 |
<td>Cause:</td> |
86 |
<td><% build.causes.each() { cause -> %> ${cause.shortDescription} <% } %></td> |
87 |
</tr> |
88 |
</table> |
89 |
<br/> |
90 |
|
91 |
<!-- CHANGE SET --> |
92 |
<% |
93 |
def changeSets = build.changeSets |
94 |
if(changeSets != null) { |
95 |
def hadChanges = false %> |
96 |
<table width=100% style="border:1px dotted"> |
97 |
<tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> > |
98 |
<td style="padding-left: 5px; font-weight: bold;" colspan="2"><font color="white" size="3">CHANGES</font></td> |
99 |
</tr> |
100 |
<% changeSets.each() { |
101 |
cs_list -> cs_list.each() { |
102 |
cs -> hadChanges = true %> |
103 |
<tr> |
104 |
<td> |
105 |
Revision |
106 |
<%= cs.metaClass.hasProperty('commitId') ? cs.commitId : cs.metaClass.hasProperty('revision') ? cs.revision : cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" %> |
107 |
by <B><%= cs.author %></B> |
108 |
</td> |
109 |
<td>${cs.msgAnnotated}</td> |
110 |
</tr> |
111 |
<% cs.affectedFiles.each() { |
112 |
p -> %> |
113 |
<tr> |
114 |
<td class="filesChanged">${p.editType.name}</td> |
115 |
<td>${p.path}</td> |
116 |
</tr> |
117 |
<% } |
118 |
} |
119 |
} |
120 |
if ( !hadChanges ) { %> |
121 |
<tr> |
122 |
<td colspan="2">No Changes</td> |
123 |
</tr> |
124 |
<% } %> |
125 |
</table> |
126 |
<br/> |
127 |
<% } %> |
128 |
|
129 |
<!-- ARTIFACTS --> |
130 |
<% |
131 |
if ( build.result != hudson.model.Result.FAILURE ) { %> |
132 |
<table width=100% style="border:1px dotted"> |
133 |
<tr bgcolor=bgcolor<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> > |
134 |
<td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">ARTIFACTS</font></td> |
135 |
</tr> |
136 |
<tr> |
137 |
<td>AppCast</td> |
138 |
</tr> |
139 |
<tr> |
140 |
<tr> |
141 |
<td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_Daelim_<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast_Daelim_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td> |
142 |
</tr> |
143 |
<tr> |
144 |
<td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_HS_<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast_HS_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td> |
145 |
</tr> |
146 |
<tr> |
147 |
<td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_SNI_<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast_SNI_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td> |
148 |
</tr> |
149 |
<!-- |
150 |
<tr> |
151 |
<td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Setup/FinalService/FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi">FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td> |
152 |
</tr> |
153 |
<tr> |
154 |
<td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Setup/ConvertService/ConvertService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi">ConvertService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td> |
155 |
</tr> |
156 |
--> |
157 |
</tr> |
158 |
</table> |
159 |
<% } %> |
160 |
|
161 |
<% |
162 |
def artifacts = build.artifacts |
163 |
if ( artifacts != null && artifacts.size() > 0 ) { %> |
164 |
<table class="section"> |
165 |
<tr class="tr-title"> |
166 |
<td class="td-title">BUILD ARTIFACTS</td> |
167 |
</tr> |
168 |
<% artifacts.each() { |
169 |
f -> %> |
170 |
<tr> |
171 |
<td> |
172 |
<a href="${rooturl}${build.url}artifact/${f}">${f}</a> |
173 |
</td> |
174 |
</tr> |
175 |
<% } %> |
176 |
</table> |
177 |
<br/> |
178 |
<% } %> |
179 |
|
180 |
<!-- MAVEN ARTIFACTS --> |
181 |
<% |
182 |
try { |
183 |
def mbuilds = build.moduleBuilds |
184 |
if ( mbuilds != null ) { %> |
185 |
<table class="section"> |
186 |
<tr class="tr-title"> |
187 |
<td class="td-title">BUILD ARTIFACTS</td> |
188 |
</tr> |
189 |
<% |
190 |
try { |
191 |
mbuilds.each() { |
192 |
m -> %> |
193 |
<tr> |
194 |
<td class="td-header-maven-module">${m.key.displayName}</td> |
195 |
</tr> |
196 |
<% |
197 |
m.value.each() { |
198 |
mvnbld -> def artifactz = mvnbld.artifacts |
199 |
if ( artifactz != null && artifactz.size() > 0) { %> |
200 |
<tr> |
201 |
<td class="td-maven-artifact"> |
202 |
<% artifactz.each() { |
203 |
f -> %> |
204 |
<a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a><br/> |
205 |
<% } %> |
206 |
</td> |
207 |
</tr> |
208 |
<% } |
209 |
} |
210 |
} |
211 |
} catch(e) { |
212 |
// we don't do anything |
213 |
} %> |
214 |
</table> |
215 |
<br/> |
216 |
<% } |
217 |
} catch(e) { |
218 |
// we don't do anything |
219 |
} %> |
220 |
|
221 |
<!-- JUnit TEMPLATE --> |
222 |
|
223 |
<% |
224 |
def junitResultList = it.JUnitTestResult |
225 |
try { |
226 |
def cucumberTestResultAction = it.getAction("org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultAction") |
227 |
junitResultList.add( cucumberTestResultAction.getResult() ) |
228 |
} catch(e) { |
229 |
//cucumberTestResultAction not exist in this build |
230 |
} |
231 |
if ( junitResultList.size() > 0 ) { %> |
232 |
<table class="section"> |
233 |
<tr class="tr-title"> |
234 |
<td class="td-title" colspan="5">${junitResultList.first().displayName}</td> |
235 |
</tr> |
236 |
<tr> |
237 |
<td class="td-title-tests">Name</td> |
238 |
<td class="td-title-tests">Failed</td> |
239 |
<td class="td-title-tests">Passed</td> |
240 |
<td class="td-title-tests">Skipped</td> |
241 |
<td class="td-title-tests">Total</td> |
242 |
</tr> |
243 |
<% junitResultList.each { |
244 |
junitResult -> junitResult.getChildren().each { |
245 |
packageResult -> %> |
246 |
<tr> |
247 |
<td>${packageResult.getName()}</td> |
248 |
<td>${packageResult.getFailCount()}</td> |
249 |
<td>${packageResult.getPassCount()}</td> |
250 |
<td>${packageResult.getSkipCount()}</td> |
251 |
<td>${packageResult.getPassCount() + packageResult.getFailCount() + packageResult.getSkipCount()}</td> |
252 |
</tr> |
253 |
<% packageResult.getPassedTests().findAll({it.getStatus().toString() == "FIXED";}).each{ |
254 |
test -> %> |
255 |
<tr> |
256 |
<td class="test test-fixed" colspan="5"> |
257 |
${test.getFullName()} ${test.getStatus()} |
258 |
</td> |
259 |
</tr> |
260 |
<% } %> |
261 |
<% packageResult.getFailedTests().sort({a,b -> a.getAge() <=> b.getAge()}).each{ |
262 |
failed_test -> %> |
263 |
<tr> |
264 |
<td class="test test-failed" colspan="5"> |
265 |
${failed_test.getFullName()} (Age: ${failed_test.getAge()}) |
266 |
</td> |
267 |
</tr> |
268 |
<% } |
269 |
} |
270 |
} %> |
271 |
</table> |
272 |
<br/> |
273 |
<% } %> |
274 |
|
275 |
<!-- CONSOLE OUTPUT --> |
276 |
<% |
277 |
if ( build.result == hudson.model.Result.FAILURE ) { %> |
278 |
<table width=100% style="border:1px dotted" cellpadding="0" cellspacing="0"> |
279 |
<tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> > |
280 |
<td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CONSOLE OUTPUT</font></td> |
281 |
</tr> |
282 |
<% build.getLog(100).each() { |
283 |
line -> %> |
284 |
<tr> |
285 |
<td style="font-family:Courier New">${org.apache.commons.lang.StringEscapeUtils.escapeHtml(line)}</td> |
286 |
</tr> |
287 |
<% } %> |
288 |
</table> |
289 |
<br/> |
290 |
<% } %> |
291 |
</BODY> |
292 |
</html> |