프로젝트

일반

사용자정보

개정판 264c6b08

ID264c6b0863f66912e021e4029b5a1693d74b8937
상위 f2b4c204
하위 6a09c9f1

백흠경이(가) 11달 전에 추가함

Fix: html template 수정

Change-Id: I68f862b4a281a9b29903eddfaa3266953df51c68

차이점 보기:

MARKUS_html - 복사본 (2).html
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
    <table width=100% style="border:1px dotted">
137
    <tr>
138
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">APP CAST</font></td>
139
    </tr>
140
	  <tr>
141
	    <tr>
142
        <td>- DAELIM -</td>
143
      </tr>
144
      <tr>
145
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/Daelim/AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
146
      </tr>
147
          <tr></tr>
148
	  <td>- DAELIM Test -</td>
149
      </tr>
150
      <tr>
151
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/Daelim_test/AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
152
      </tr>
153
          <tr></tr>
154
      <tr>
155
        <td>- HYOSUNG -</td>
156
      </tr>
157
      <tr>
158
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/HS/AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
159
      </tr>
160
       <tr></tr>
161
      <tr>
162
        <td>- S&I -</td>
163
      </tr>
164
      <tr>
165
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/SNI/AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip">AppCast-<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
166
      </tr>
167
      </table>
168
      <tr></tr>
169
       <table width=100% style="border:1px dotted">
170
    <tr>
171
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CLIENT SETUP</font></td>
172
    </tr>
173
      <tr></tr>
174
      <tr>
175
        <td>- DAELIM -</td>
176
      </tr>
177
	  <tr>
178
      <tr>
179
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Client/Daelim/Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi">Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
180
      </tr>
181
          <tr></tr>
182
      <tr>
183
        <td>- HYOSUNG -</td>
184
      </tr>
185
      <tr>
186
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Client/HS/Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi">Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
187
      </tr>
188
       <tr></tr>
189
      <tr>
190
        <td>- S&I -</td>
191
      </tr>
192
      <tr>
193
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Client/SNI/Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi">Setup-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
194
      </tr>
195
      </table>
196
     <!--
197
       <tr>
198
          <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>
199
      </tr>
200
      <tr>
201
          <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>
202
      </tr>
203
     -->
204
    </tr>
205
  </table>
206
<% } %>
207

  
208
  <% 
209
  def artifacts = build.artifacts
210
  if ( artifacts != null && artifacts.size() > 0 ) { %>
211
  <table class="section">
212
    <tr class="tr-title">
213
      <td class="td-title">BUILD ARTIFACTS</td>
214
    </tr>
215
    <% artifacts.each() {
216
      f -> %>
217
      <tr>
218
        <td>
219
          <a href="${rooturl}${build.url}artifact/${f}">${f}</a>
220
      </td>
221
    </tr>
222
    <% } %>
223
  </table>
224
  <br/>
225
  <% } %>
226

  
227
<!-- MAVEN ARTIFACTS -->
228
  <%
229
  try {
230
    def mbuilds = build.moduleBuilds
231
    if ( mbuilds != null ) { %>
232
  <table class="section">
233
    <tr class="tr-title">
234
      <td class="td-title">BUILD ARTIFACTS</td>
235
    </tr>
236
      <%
237
      try {
238
        mbuilds.each() {
239
          m -> %>
240
    <tr>
241
      <td class="td-header-maven-module">${m.key.displayName}</td>
242
    </tr>
243
          <%
244
          m.value.each() { 
245
            mvnbld -> def artifactz = mvnbld.artifacts
246
            if ( artifactz != null && artifactz.size() > 0) { %>
247
    <tr>
248
      <td class="td-maven-artifact">
249
              <% artifactz.each() {
250
                f -> %>
251
        <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a><br/>
252
              <% } %>
253
      </td>
254
    </tr>
255
            <% }
256
          }
257
        }
258
      } catch(e) {
259
        // we don't do anything
260
      } %>
261
  </table>
262
  <br/>
263
    <% }
264
  } catch(e) {
265
    // we don't do anything
266
  } %>
267

  
268
<!-- JUnit TEMPLATE -->
269

  
270
  <%
271
  def junitResultList = it.JUnitTestResult
272
  try {
273
    def cucumberTestResultAction = it.getAction("org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultAction")
274
    junitResultList.add( cucumberTestResultAction.getResult() )
275
  } catch(e) {
276
    //cucumberTestResultAction not exist in this build
277
  }
278
  if ( junitResultList.size() > 0 ) { %>
279
  <table class="section">
280
    <tr class="tr-title">
281
      <td class="td-title" colspan="5">${junitResultList.first().displayName}</td>
282
    </tr>
283
    <tr>
284
        <td class="td-title-tests">Name</td>
285
        <td class="td-title-tests">Failed</td>
286
        <td class="td-title-tests">Passed</td>
287
        <td class="td-title-tests">Skipped</td>
288
        <td class="td-title-tests">Total</td>
289
      </tr>
290
    <% junitResultList.each {
291
      junitResult -> junitResult.getChildren().each {
292
        packageResult -> %>
293
    <tr>
294
      <td>${packageResult.getName()}</td>
295
      <td>${packageResult.getFailCount()}</td>
296
      <td>${packageResult.getPassCount()}</td>
297
      <td>${packageResult.getSkipCount()}</td>
298
      <td>${packageResult.getPassCount() + packageResult.getFailCount() + packageResult.getSkipCount()}</td>
299
    </tr>
300
    <% packageResult.getPassedTests().findAll({it.getStatus().toString() == "FIXED";}).each{
301
        test -> %>
302
            <tr>
303
              <td class="test test-fixed" colspan="5">
304
                ${test.getFullName()} ${test.getStatus()}
305
              </td>
306
            </tr>
307
        <% } %>
308
        <% packageResult.getFailedTests().sort({a,b -> a.getAge() <=> b.getAge()}).each{
309
          failed_test -> %>
310
    <tr>
311
      <td class="test test-failed" colspan="5">
312
        ${failed_test.getFullName()} (Age: ${failed_test.getAge()})
313
      </td>
314
    </tr>
315
        <% }
316
      }
317
    } %>
318
  </table>
319
  <br/>
320
  <% } %>
321

  
322
<!-- CONSOLE OUTPUT -->
323
  <%
324
  if ( build.result == hudson.model.Result.FAILURE ) { %>
325
  <table width=100% style="border:1px dotted" cellpadding="0" cellspacing="0">
326
    <tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> >
327
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CONSOLE OUTPUT</font></td>
328
    </tr>
329
    <% 	build.getLog(100).each() {
330
      line -> %>
331
	  <tr>
332
      <td style="font-family:Courier New">${org.apache.commons.lang.StringEscapeUtils.escapeHtml(line)}</td>
333
    </tr>
334
    <% } %>
335
  </table>
336
  <br/>
337
  <% } %>
338
</BODY>
339
</html>
MARKUS_html - 복사본.html
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
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_Daelim_<%= build.getEnvVars()[" BUILD_NAME"]=BUILD_NAME"] %=%>.zip">AppCast_Daelim_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
141
      </tr>
142
      <tr>
143
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_HS_<%= build.getEnvVars()[" BUILD_NAME"]=BUILD_NAME"] %=%>.zip">AppCast_HS_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
144
      </tr>
145
      <tr>
146
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/AppCast/AppCast_SNI_<%= build.getEnvVars()[" BUILD_NAME"]=BUILD_NAME"] %=%>.zip">AppCast_SNI_<%= build.getEnvVars()["BUILD_NAME"] %>.zip </a></td>
147
      </tr>
148
      <tr>
149
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Setup/FinalService/FinalService-<%= build.getEnvVars()[" BUILD_NAME"]=BUILD_NAME"] %=%>.msi">FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
150
      </tr>
151
      <tr>
152
          <td><a href="http://www.devdoftech.co.kr:9081/artifactory/${project.name}/Setup/ConvertService/ConvertService-<%= build.getEnvVars()[" BUILD_NAME"]=BUILD_NAME"] %=%>.msi">ConvertService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
153
      </tr>
154
      <tr></tr>
155
  </table>
156
<% } %>
157

  
158
  <% 
159
  def artifacts = build.artifacts
160
  if ( artifacts != null && artifacts.size() > 0 ) { %>
161
  <table class="section">
162
    <tr class="tr-title">
163
      <td class="td-title">BUILD ARTIFACTS</td>
164
    </tr>
165
    <% artifacts.each() {
166
      f -> %>
167
      <tr>
168
        <td>
169
          <a href="${rooturl}${build.url}artifact/${f}">${f}</a>
170
      </td>
171
    </tr>
172
    <% } %>
173
  </table>
174
  <br/>
175
  <% } %>
176

  
177
<!-- MAVEN ARTIFACTS -->
178
  <%
179
  try {
180
    def mbuilds = build.moduleBuilds
181
    if ( mbuilds != null ) { %>
182
  <table class="section">
183
    <tr class="tr-title">
184
      <td class="td-title">BUILD ARTIFACTS</td>
185
    </tr>
186
      <%
187
      try {
188
        mbuilds.each() {
189
          m -> %>
190
    <tr>
191
      <td class="td-header-maven-module">${m.key.displayName}</td>
192
    </tr>
193
          <%
194
          m.value.each() { 
195
            mvnbld -> def artifactz = mvnbld.artifacts
196
            if ( artifactz != null && artifactz.size() > 0) { %>
197
    <tr>
198
      <td class="td-maven-artifact">
199
              <% artifactz.each() {
200
                f -> %>
201
        <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a><br/>
202
              <% } %>
203
      </td>
204
    </tr>
205
            <% }
206
          }
207
        }
208
      } catch(e) {
209
        // we don't do anything
210
      } %>
211
  </table>
212
  <br/>
213
    <% }
214
  } catch(e) {
215
    // we don't do anything
216
  } %>
217

  
218
<!-- JUnit TEMPLATE -->
219

  
220
  <%
221
  def junitResultList = it.JUnitTestResult
222
  try {
223
    def cucumberTestResultAction = it.getAction("org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultAction")
224
    junitResultList.add( cucumberTestResultAction.getResult() )
225
  } catch(e) {
226
    //cucumberTestResultAction not exist in this build
227
  }
228
  if ( junitResultList.size() > 0 ) { %>
229
  <table class="section">
230
    <tr class="tr-title">
231
      <td class="td-title" colspan="5">${junitResultList.first().displayName}</td>
232
    </tr>
233
    <tr>
234
        <td class="td-title-tests">Name</td>
235
        <td class="td-title-tests">Failed</td>
236
        <td class="td-title-tests">Passed</td>
237
        <td class="td-title-tests">Skipped</td>
238
        <td class="td-title-tests">Total</td>
239
      </tr>
240
    <% junitResultList.each {
241
      junitResult -> junitResult.getChildren().each {
242
        packageResult -> %>
243
    <tr>
244
      <td>${packageResult.getName()}</td>
245
      <td>${packageResult.getFailCount()}</td>
246
      <td>${packageResult.getPassCount()}</td>
247
      <td>${packageResult.getSkipCount()}</td>
248
      <td>${packageResult.getPassCount() + packageResult.getFailCount() + packageResult.getSkipCount()}</td>
249
    </tr>
250
    <% packageResult.getPassedTests().findAll({it.getStatus().toString() == "FIXED";}).each{
251
        test -> %>
252
            <tr>
253
              <td class="test test-fixed" colspan="5">
254
                ${test.getFullName()} ${test.getStatus()}
255
              </td>
256
            </tr>
257
        <% } %>
258
        <% packageResult.getFailedTests().sort({a,b -> a.getAge() <=> b.getAge()}).each{
259
          failed_test -> %>
260
    <tr>
261
      <td class="test test-failed" colspan="5">
262
        ${failed_test.getFullName()} (Age: ${failed_test.getAge()})
263
      </td>
264
    </tr>
265
        <% }
266
      }
267
    } %>
268
  </table>
269
  <br/>
270
  <% } %>
271

  
272
<!-- CONSOLE OUTPUT -->
273
  <%
274
  if ( build.result == hudson.model.Result.FAILURE ) { %>
275
  <table width=100% style="border:1px dotted" cellpadding="0" cellspacing="0">
276
    <tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> >
277
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CONSOLE OUTPUT</font></td>
278
    </tr>
279
    <% 	build.getLog(100).each() {
280
      line -> %>
281
	  <tr>
282
      <td style="font-family:Courier New">${org.apache.commons.lang.StringEscapeUtils.escapeHtml(line)}</td>
283
    </tr>
284
    <% } %>
285
  </table>
286
  <br/>
287
  <% } %>
288
</BODY>
289
</html>
XMARKUS_html.2024.04.19.template
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=<%= (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>PROGRAM</th>
138
    </tr>
139
    <tr>
140
    <td><a href="http://www.devdoftech.co.kr:8081/artifactory/${project.name}/${project.name}-<%= build.getEnvVars()["COMPANY"] %>-FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi" title="ID/PSWD = guest/q1234567U"> ${project.name}-<%= build.getEnvVars()["COMPANY"] %>-FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
141
    </tr>
142
</table>
143
<% } %>
144

  
145
  <% 
146
  def artifacts = build.artifacts
147
  if ( artifacts != null && artifacts.size() > 0 ) { %>
148
  <table class="section">
149
    <tr class="tr-title">
150
      <td class="td-title">BUILD ARTIFACTS</td>
151
    </tr>
152
    <% artifacts.each() {
153
      f -> %>
154
      <tr>
155
        <td>
156
          <a href="${rooturl}${build.url}artifact/${f}">${f}</a>
157
      </td>
158
    </tr>
159
    <% } %>
160
  </table>
161
  <br/>
162
  <% } %>
163

  
164
<!-- MAVEN ARTIFACTS -->
165
  <%
166
  try {
167
    def mbuilds = build.moduleBuilds
168
    if ( mbuilds != null ) { %>
169
  <table class="section">
170
    <tr class="tr-title">
171
      <td class="td-title">BUILD ARTIFACTS</td>
172
    </tr>
173
      <%
174
      try {
175
        mbuilds.each() {
176
          m -> %>
177
    <tr>
178
      <td class="td-header-maven-module">${m.key.displayName}</td>
179
    </tr>
180
          <%
181
          m.value.each() { 
182
            mvnbld -> def artifactz = mvnbld.artifacts
183
            if ( artifactz != null && artifactz.size() > 0) { %>
184
    <tr>
185
      <td class="td-maven-artifact">
186
              <% artifactz.each() {
187
                f -> %>
188
        <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a><br/>
189
              <% } %>
190
      </td>
191
    </tr>
192
            <% }
193
          }
194
        }
195
      } catch(e) {
196
        // we don't do anything
197
      } %>
198
  </table>
199
  <br/>
200
    <% }
201
  } catch(e) {
202
    // we don't do anything
203
  } %>
204

  
205
<!-- JUnit TEMPLATE -->
206

  
207
  <%
208
  def junitResultList = it.JUnitTestResult
209
  try {
210
    def cucumberTestResultAction = it.getAction("org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultAction")
211
    junitResultList.add( cucumberTestResultAction.getResult() )
212
  } catch(e) {
213
    //cucumberTestResultAction not exist in this build
214
  }
215
  if ( junitResultList.size() > 0 ) { %>
216
  <table class="section">
217
    <tr class="tr-title">
218
      <td class="td-title" colspan="5">${junitResultList.first().displayName}</td>
219
    </tr>
220
    <tr>
221
        <td class="td-title-tests">Name</td>
222
        <td class="td-title-tests">Failed</td>
223
        <td class="td-title-tests">Passed</td>
224
        <td class="td-title-tests">Skipped</td>
225
        <td class="td-title-tests">Total</td>
226
      </tr>
227
    <% junitResultList.each {
228
      junitResult -> junitResult.getChildren().each {
229
        packageResult -> %>
230
    <tr>
231
      <td>${packageResult.getName()}</td>
232
      <td>${packageResult.getFailCount()}</td>
233
      <td>${packageResult.getPassCount()}</td>
234
      <td>${packageResult.getSkipCount()}</td>
235
      <td>${packageResult.getPassCount() + packageResult.getFailCount() + packageResult.getSkipCount()}</td>
236
    </tr>
237
    <% packageResult.getPassedTests().findAll({it.getStatus().toString() == "FIXED";}).each{
238
        test -> %>
239
            <tr>
240
              <td class="test test-fixed" colspan="5">
241
                ${test.getFullName()} ${test.getStatus()}
242
              </td>
243
            </tr>
244
        <% } %>
245
        <% packageResult.getFailedTests().sort({a,b -> a.getAge() <=> b.getAge()}).each{
246
          failed_test -> %>
247
    <tr>
248
      <td class="test test-failed" colspan="5">
249
        ${failed_test.getFullName()} (Age: ${failed_test.getAge()})
250
      </td>
251
    </tr>
252
        <% }
253
      }
254
    } %>
255
  </table>
256
  <br/>
257
  <% } %>
258

  
259
<!-- CONSOLE OUTPUT -->
260
  <%
261
  if ( build.result == hudson.model.Result.FAILURE ) { %>
262
  <table width=100% style="border:1px dotted" cellpadding="0" cellspacing="0">
263
    <tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> >
264
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CONSOLE OUTPUT</font></td>
265
    </tr>
266
    <% 	build.getLog(100).each() {
267
      line -> %>
268
	  <tr>
269
      <td style="font-family:Courier New">${org.apache.commons.lang.StringEscapeUtils.escapeHtml(line)}</td>
270
    </tr>
271
    <% } %>
272
  </table>
273
  <br/>
274
  <% } %>
275
</BODY>
276
</html>
XMARKUS_html.template
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=<%= (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>PROGRAM</th>
138
    </tr>
139
    <tr>
140
    <td><a href="http://www.devdoftech.co.kr:8081/artifactory/${project.name}/${project.name}-<%= build.getEnvVars()["COMPANY"] %>-FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi" title="ID/PSWD = guest/q1234567U"> ${project.name}-<%= build.getEnvVars()["COMPANY"] %>-FinalService-<%= build.getEnvVars()["BUILD_NAME"] %>.msi </a></td>
141
    </tr>
142
</table>
143
<% } %>
144

  
145
  <% 
146
  def artifacts = build.artifacts
147
  if ( artifacts != null && artifacts.size() > 0 ) { %>
148
  <table class="section">
149
    <tr class="tr-title">
150
      <td class="td-title">BUILD ARTIFACTS</td>
151
    </tr>
152
    <% artifacts.each() {
153
      f -> %>
154
      <tr>
155
        <td>
156
          <a href="${rooturl}${build.url}artifact/${f}">${f}</a>
157
      </td>
158
    </tr>
159
    <% } %>
160
  </table>
161
  <br/>
162
  <% } %>
163

  
164
<!-- MAVEN ARTIFACTS -->
165
  <%
166
  try {
167
    def mbuilds = build.moduleBuilds
168
    if ( mbuilds != null ) { %>
169
  <table class="section">
170
    <tr class="tr-title">
171
      <td class="td-title">BUILD ARTIFACTS</td>
172
    </tr>
173
      <%
174
      try {
175
        mbuilds.each() {
176
          m -> %>
177
    <tr>
178
      <td class="td-header-maven-module">${m.key.displayName}</td>
179
    </tr>
180
          <%
181
          m.value.each() { 
182
            mvnbld -> def artifactz = mvnbld.artifacts
183
            if ( artifactz != null && artifactz.size() > 0) { %>
184
    <tr>
185
      <td class="td-maven-artifact">
186
              <% artifactz.each() {
187
                f -> %>
188
        <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a><br/>
189
              <% } %>
190
      </td>
191
    </tr>
192
            <% }
193
          }
194
        }
195
      } catch(e) {
196
        // we don't do anything
197
      } %>
198
  </table>
199
  <br/>
200
    <% }
201
  } catch(e) {
202
    // we don't do anything
203
  } %>
204

  
205
<!-- JUnit TEMPLATE -->
206

  
207
  <%
208
  def junitResultList = it.JUnitTestResult
209
  try {
210
    def cucumberTestResultAction = it.getAction("org.jenkinsci.plugins.cucumber.jsontestsupport.CucumberTestResultAction")
211
    junitResultList.add( cucumberTestResultAction.getResult() )
212
  } catch(e) {
213
    //cucumberTestResultAction not exist in this build
214
  }
215
  if ( junitResultList.size() > 0 ) { %>
216
  <table class="section">
217
    <tr class="tr-title">
218
      <td class="td-title" colspan="5">${junitResultList.first().displayName}</td>
219
    </tr>
220
    <tr>
221
        <td class="td-title-tests">Name</td>
222
        <td class="td-title-tests">Failed</td>
223
        <td class="td-title-tests">Passed</td>
224
        <td class="td-title-tests">Skipped</td>
225
        <td class="td-title-tests">Total</td>
226
      </tr>
227
    <% junitResultList.each {
228
      junitResult -> junitResult.getChildren().each {
229
        packageResult -> %>
230
    <tr>
231
      <td>${packageResult.getName()}</td>
232
      <td>${packageResult.getFailCount()}</td>
233
      <td>${packageResult.getPassCount()}</td>
234
      <td>${packageResult.getSkipCount()}</td>
235
      <td>${packageResult.getPassCount() + packageResult.getFailCount() + packageResult.getSkipCount()}</td>
236
    </tr>
237
    <% packageResult.getPassedTests().findAll({it.getStatus().toString() == "FIXED";}).each{
238
        test -> %>
239
            <tr>
240
              <td class="test test-fixed" colspan="5">
241
                ${test.getFullName()} ${test.getStatus()}
242
              </td>
243
            </tr>
244
        <% } %>
245
        <% packageResult.getFailedTests().sort({a,b -> a.getAge() <=> b.getAge()}).each{
246
          failed_test -> %>
247
    <tr>
248
      <td class="test test-failed" colspan="5">
249
        ${failed_test.getFullName()} (Age: ${failed_test.getAge()})
250
      </td>
251
    </tr>
252
        <% }
253
      }
254
    } %>
255
  </table>
256
  <br/>
257
  <% } %>
258

  
259
<!-- CONSOLE OUTPUT -->
260
  <%
261
  if ( build.result == hudson.model.Result.FAILURE ) { %>
262
  <table width=100% style="border:1px dotted" cellpadding="0" cellspacing="0">
263
    <tr bgcolor=<%= (build.result == null || build.result.toString() == 'SUCCESS') ? '#27AE60' : build.result.toString() == 'FAILURE' ? '#E74C3C' : '#f4e242' %> >
264
      <td style="padding-left: 5px; font-weight: bold;"><font color="white" size="3">CONSOLE OUTPUT</font></td>
265
    </tr>
266
    <% 	build.getLog(100).each() {
267
      line -> %>
268
	  <tr>
269
      <td style="font-family:Courier New">${org.apache.commons.lang.StringEscapeUtils.escapeHtml(line)}</td>
270
    </tr>
271
    <% } %>
272
  </table>
273
  <br/>
274
  <% } %>
275
</BODY>
276
</html>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)