프로젝트

일반

사용자정보

개정판 5183a15f

ID5183a15f86b0b7b139240201fa8616f4e36893fb
상위 c19b5a16
하위 11608608

백흠경이(가) 5년 이상 전에 추가함

issue #624: 설치 파일 이름에 빌드 버전 포함시킴

Change-Id: I1a599ec0dd79e4e682b1e176610362853193f1b8

차이점 보기:

App.spec
32 32
pyz = PYZ(a.pure, a.zipped_data,
33 33
             cipher=block_cipher)
34 34
exe = EXE(pyz,
35
          a.scripts,
36
          [],
37
          exclude_binaries=True,
38
          name='ID2',
39
          debug=False,
40
          bootloader_ignore_signals=False,
41
          strip=False,
42
          upx=True,
43
          console=False )
35
        a.scripts,
36
        [],
37
        exclude_binaries=True,
38
        name='ID2',
39
        debug=False,
40
        bootloader_ignore_signals=False,
41
        strip=False,
42
        upx=True,
43
        console=False,
44
		version='version.rc')
44 45
coll = COLLECT(exe,
45
               a.binaries,
46
               a.zipfiles,
47
               a.datas,
48
               strip=False,
49
               upx=True,
50
               name='App')
46
        a.binaries,
47
        a.zipfiles,
48
        a.datas,
49
        strip=False,
50
        upx=True,
51
        name='App')
ID2_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:9081/artifactory/${project.name}/Setup/${project.name}-<%= build.getEnvVars()["BUILD_NAME"] %>.msi"> ID2-<%= 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>
build.bat
10 10
pyinstaller App.spec --onedir -p "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\PyQt5" -w --log-level=DEBUG --hidden-import=tkinter,pyqtgraph -y
11 11
IF %ERRORLEVEL% NEQ 0 goto :ERROR
12 12

  
13
Del Setup\*.wixpdb
14
Del Setup\*.wixobj
15
Del Setup\*.msi
16

  
17
%SIGNTOOLPATH% sign /v /f %SIGNPATH% /p Doftech1073# /tr http://timestamp.digicert.com /td sha256 /fd sha256 "c:\Temp\workspace\ID2\Setup\*.exe"
18

  
19
%CANDLE% ".\ID2.wxs" -out .\Setup\
20
IF %ERRORLEVEL% NEQ 0 goto :ERROR
21
%LIGHT% -out ".\Setup\ID2-%1.msi" ".\Setup\ID2.wixobj" -ext WixUIExtension -ext WixUtilExtension
22
IF %ERRORLEVEL% NEQ 0 goto :ERROR
23

  
24
%SIGNTOOLPATH% sign /v /f %SIGNPATH% /p Doftech1073# /tr http://timestamp.digicert.com /td sha256 /fd sha256 "c:\Temp\workspace\ID2\Setup\*.msi"
25

  
26
REM deploy artifacts
27
..\curl.exe -uadmin:dof1073# -X PUT "http://www.devdoftech.co.kr:9081/artifactory/ID2/Setup/ID2-%1.msi" -T ".\Setup\ID2-%1.msi"
28
IF %ERRORLEVEL% NEQ 0 goto :ERROR
29

  
30 13
:EOF
31 14
ECHO process completed 
32 15
REM exit
package.bat
1
SET yyyymmdd=%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%
2
SET hhmmss=%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
3
SET hhmmss=%hhmmss: =0%
4

  
5
SET CANDLE="C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe"
6
SET LIGHT="C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe"
7
SET SIGNTOOLPATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool.exe"
8
SET SIGNPATH="c:\cert\www.doftech.co.kr.pfx"
9

  
10
Del Setup\*.wixpdb
11
Del Setup\*.wixobj
12
Del Setup\*.msi
13

  
14
%SIGNTOOLPATH% sign /v /f %SIGNPATH% /p Doftech1073# /tr http://timestamp.digicert.com /td sha256 /fd sha256 "c:\Temp\workspace\ID2\Setup\*.exe"
15

  
16
%CANDLE% ".\ID2.wxs" -out .\Setup\
17
IF %ERRORLEVEL% NEQ 0 goto :ERROR
18
%LIGHT% -out ".\Setup\ID2-%1.msi" ".\Setup\ID2.wixobj" -ext WixUIExtension -ext WixUtilExtension
19
IF %ERRORLEVEL% NEQ 0 goto :ERROR
20

  
21
%SIGNTOOLPATH% sign /v /f %SIGNPATH% /p Doftech1073# /tr http://timestamp.digicert.com /td sha256 /fd sha256 "c:\Temp\workspace\ID2\Setup\*.msi"
22

  
23
REM deploy artifacts
24
..\curl.exe -uadmin:dof1073# -X PUT "http://www.devdoftech.co.kr:9081/artifactory/ID2/Setup/ID2-%1.msi" -T ".\Setup\ID2-%1.msi"
25
IF %ERRORLEVEL% NEQ 0 goto :ERROR
26

  
27
:EOF
28
ECHO process completed 
29
REM exit
30

  
31
:ERROR
32
REM exit 1
version.rc
1
# UTF-8
2
#
3
# For more details about fixed file info 'ffi' see:
4
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
5
VSVersionInfo(
6
  ffi=FixedFileInfo(
7
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
8
# Set not needed items to zero 0.
9
filevers=(1,0,$BUILD_NUMBER,0),
10
prodvers=(1,0,$BUILD_NUMBER,0),
11
# Contains a bitmask that specifies the valid bits 'flags'r
12
mask=0x3f,
13
# Contains a bitmask that specifies the Boolean attributes of the file.
14
flags=0x0,
15
# The operating system for which this file was designed.
16
# 0x4 - NT and there is no need to change it.
17
OS=0x4,
18
# The general type of file.
19
# 0x1 - the file is an application.
20
fileType=0x1,
21
# The function of the file.
22
# 0x0 - the function is not defined for this fileType
23
subtype=0x0,
24
# Creation date and time stamp.
25
date=(0, 0)
26
),
27
  kids=[
28
StringFileInfo(
29
  [
30
  StringTable(
31
    u'040904B0',
32
    [StringStruct(u'CompanyName', u'DOFTECH'),
33
    StringStruct(u'FileDescription', u'Image Drawing to Intelligent Drawing'),
34
    StringStruct(u'FileVersion', u'1.0.$BUILD_NUMBER.0'),
35
    StringStruct(u'InternalName', u'ID2'),
36
    StringStruct(u'LegalCopyright', u'Copyright(c) DOFTECH'),
37
    StringStruct(u'OriginalFilename', u'ID2.exe'),
38
    StringStruct(u'ProductName', u'ID2'),
39
    StringStruct(u'ProductVersion', u'1.0.$BUILD_NUMBER.0')])
40
  ]), 
41
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
42
  ]
43
)

내보내기 Unified diff

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