blob: 86a36c3d6708e42184763e864366a0d5613361ba [file] [log] [blame]
david_williams8f37c5e2007-10-01 01:05:18 +00001<project
2 name="Publish Build"
3 default="default"
4 basedir=".">
ndaib8cedc82005-09-13 18:00:32 +00005
david_williamsc84ab8c2006-12-11 18:50:34 +00006 <!-- Properties that must be passed to this script:
david_williamsa76816d2006-12-11 20:10:22 +00007 buildDirectory: Path to perform the build in. (A working directory)
8 buildType: Type of build (nightly, integration etc.)
9 buildId: Build name
10 buildLabel: <buildType>-<buildName>-<timestamp>
11 -->
david_williams8f37c5e2007-10-01 01:05:18 +000012
david_williamsb7db8ba2007-02-19 01:54:04 +000013 <property environment="env" />
david_williams8f37c5e2007-10-01 01:05:18 +000014
15 <property
16 name="resultDir"
17 value="${buildDirectory}/${buildLabel}" />
david_williamsc84ab8c2006-12-11 18:50:34 +000018 <!--name of generated index page-->
david_williams8f37c5e2007-10-01 01:05:18 +000019 <property
20 name="indexFileName"
21 value="index.php" />
22
23 <property
24 name="templateDir"
25 value="${wtp.builder.home}/distribution/wtp.site" />
26 <property
27 name="resultingIndex"
28 value="${resultDir}/${indexFileName}" />
29
30 <echo
31 level="debug"
32 message="resultDir: ${resultDir}" />
33 <echo
34 level="debug"
35 message="templateDir: ${templateDir}" />
36 <echo
37 level="debug"
38 message="resultingIndex: ${resultingIndex}" />
39
david_williams535d6812007-03-29 06:46:26 +000040
ndaib8cedc82005-09-13 18:00:32 +000041
david_williamsc84ab8c2006-12-11 18:50:34 +000042 <target name="default">
david_williams8f37c5e2007-10-01 01:05:18 +000043 <copy
44 overwrite="true"
45 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
46 tofile="${resultingIndex}" />
david_williamsc84ab8c2006-12-11 18:50:34 +000047 <antcall target="countFiles" />
david_williamsb7db8ba2007-02-19 01:54:04 +000048 <antcall target="generateCompileIndex" />
49 <antcall target="generateJUnitTestsIndex" />
david_williamsc84ab8c2006-12-11 18:50:34 +000050 <antcall target="getStaticFiles" />
51 </target>
ndaib8cedc82005-09-13 18:00:32 +000052
david_williams8f37c5e2007-10-01 01:05:18 +000053 <target name="generateCompileIndex">
david_williamsb7db8ba2007-02-19 01:54:04 +000054
david_williams8f37c5e2007-10-01 01:05:18 +000055
56 <!--
57 <taskdef name="indexResults" classname="org.eclipse.wtp.releng.tools.ResultsSummaryGenerator" />
david_williams6252b612007-02-25 07:23:43 +000058 -->
david_williamsb7db8ba2007-02-19 01:54:04 +000059
60 <!--
61 isBuildTested: true|false should JUnit plugin test results be used to generate index page
62 dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
63 xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
64 dropDirectoryName: path to directory containing the result of the build.
65 testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results
66 testResultsHtmlFileName: name of file which will be generated with links to JUnit test results
67 dropHtmlFileName: name of generated index page
68 hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results
69 hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs
70 testManifestFileName: name of xml file containing descriptions of zip types and log files
71
72
73
74 -->
david_williams8f37c5e2007-10-01 01:05:18 +000075 <property
76 file="${buildDirectory}/maps/releng/maps/dependencies.properties" />
david_williamsb7db8ba2007-02-19 01:54:04 +000077
78 <!-- create tables of test plugin compiles first -->
david_williams8f37c5e2007-10-01 01:05:18 +000079 <summarizeResults
80 isBuildTested="false"
81 includeAll="true"
82 dropTokenList="${dropTokenList}"
83 xmlDirectoryName=""
84 dropDirectoryName="${resultDir}"
85 testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template"
86 testResultsHtmlFileName="testCompileResults.php"
87 hrefTestResultsTargetPath=""
88 hrefCompileLogsTargetPath="testcompilelogs"
89 compileLogsDirectoryName="${resultDir}/testcompilelogs" />
david_williamsb7db8ba2007-02-19 01:54:04 +000090
david_williams8f37c5e2007-10-01 01:05:18 +000091 <xslt
92 basedir="${resultDir}/testcompilelogs"
93 destdir="${resultDir}/testcompilelogs"
94 includes="**/*.bin.xml"
95 scanincludeddirectories="true"
96 style="compilerXMLOutputToHTML.xsl"
97 force="true" />
98
david_williamsb7db8ba2007-02-19 01:54:04 +000099 <!-- create table of code plugins compiles -->
david_williams8f37c5e2007-10-01 01:05:18 +0000100 <summarizeResults
101 isBuildTested="false"
102 includeAll="true"
103 dropTokenList="${dropTokenList}"
104 xmlDirectoryName=""
105 dropDirectoryName="${resultDir}"
106 testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template"
107 testResultsHtmlFileName="compileResults.php"
108 hrefTestResultsTargetPath="testResults/html"
109 hrefCompileLogsTargetPath="compilelogs"
110 compileLogsDirectoryName="${resultDir}/compilelogs" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000111
112
david_williams8f37c5e2007-10-01 01:05:18 +0000113 <xslt
114 basedir="${resultDir}/compilelogs"
115 destdir="${resultDir}/compilelogs"
116 includes="**/*.bin.xml"
117 scanincludeddirectories="true"
118 style="compilerXMLOutputToHTML.xsl"
119 force="true" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000120
121 <tstamp>
david_williams8f37c5e2007-10-01 01:05:18 +0000122 <format
123 property="TODAY"
124 pattern="MMMM d, yyyy" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000125 </tstamp>
126
127 <!-- Insert Build Type descriptor -->
128 <antcall target="${buildType}" />
129
david_williamsf05e3002007-10-01 02:14:57 +0000130 <antcall target="writeData" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000131
132 <mkdir dir="${resultDir}/whatisfixed" />
david_williams8f37c5e2007-10-01 01:05:18 +0000133 <echo
134 file="${resultDir}/whatisfixed/buglog.html"
135 append="true">
david_williamsb7db8ba2007-02-19 01:54:04 +0000136 what is fixed list is not available yet!
137 </echo>
138
139 <!-- Update timestamp on file to permit overwrite through Ant copy task -->
david_williams535d6812007-03-29 06:46:26 +0000140 <touch file="${resultingIndex}" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000141 </target>
david_williams8f37c5e2007-10-01 01:05:18 +0000142
143 <target
144 name="generateJUnitTestsIndex"
145 depends="checkIfTested"
146 if="doTests">
ndaib8cedc82005-09-13 18:00:32 +0000147
david_williamsc84ab8c2006-12-11 18:50:34 +0000148 <!--
david_williamsa76816d2006-12-11 20:10:22 +0000149 isBuildTested: true|false should JUnit plugin test results be used to generate index page
150 dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
151 xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
152 dropDirectoryName: path to directory containing the result of the build.
153 testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results
154 testResultsHtmlFileName: name of file which will be generated with links to JUnit test results
155 dropHtmlFileName: name of generated index page
156 hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results
157 hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs
158 testManifestFileName: name of xml file containing descriptions of zip types and log files
159
160
161
162 -->
david_williams8f37c5e2007-10-01 01:05:18 +0000163 <property
164 file="${buildDirectory}/maps/releng/maps/dependencies.properties" />
ndaib8cedc82005-09-13 18:00:32 +0000165
david_williams4d2fe842006-12-13 06:26:45 +0000166 <!-- create table of test plugin compiles first -->
david_williams944e4d02006-12-14 05:59:27 +0000167 <!-- set isBuildTested to true for the "compile only" results -->
david_williamsb7db8ba2007-02-19 01:54:04 +0000168
david_williams8f37c5e2007-10-01 01:05:18 +0000169 <summarizeResults
170 isBuildTested="true"
171 dropTokenList="${dropTokenList}"
172 dropDirectoryName="${resultDir}"
173 xmlDirectoryName="${resultDir}/testResults/xml"
174 testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template"
175 testResultsHtmlFileName="testResults.php"
176 hrefTestResultsTargetPath="testResults/html"
177 compileLogsDirectoryName="" />
178
ndaib8cedc82005-09-13 18:00:32 +0000179
david_williamsc84ab8c2006-12-11 18:50:34 +0000180 <tstamp>
david_williams8f37c5e2007-10-01 01:05:18 +0000181 <format
182 property="TODAY"
183 pattern="MMMM d, yyyy" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000184 </tstamp>
ndaib8cedc82005-09-13 18:00:32 +0000185
david_williamsc84ab8c2006-12-11 18:50:34 +0000186 <!-- Insert Build Type descriptor -->
187 <antcall target="${buildType}" />
ndaib8cedc82005-09-13 18:00:32 +0000188
david_williamsf05e3002007-10-01 02:14:57 +0000189 <antcall target="writeData" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000190
david_williamsb7db8ba2007-02-19 01:54:04 +0000191 <mkdir dir="${resultDir}/whatisfixed" />
david_williams8f37c5e2007-10-01 01:05:18 +0000192 <echo
193 file="${resultDir}/whatisfixed/buglog.html"
194 append="true">
david_williamsa76816d2006-12-11 20:10:22 +0000195 what is fixed list is not available yet!
196 </echo>
ndaib8cedc82005-09-13 18:00:32 +0000197
david_williamsc84ab8c2006-12-11 18:50:34 +0000198 <!-- Update timestamp on file to permit overwrite through Ant copy task -->
david_williams535d6812007-03-29 06:46:26 +0000199 <touch file="${resultingIndex}" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000200 </target>
ndaib8cedc82005-09-13 18:00:32 +0000201
202
david_williamsc84ab8c2006-12-11 18:50:34 +0000203 <target name="getStaticFiles">
204 <!--get static files required in the buildLabel directory-->
david_williamsb7db8ba2007-02-19 01:54:04 +0000205 <copy todir="${resultDir}">
206 <fileset dir="${templateDir}/staticDropFiles" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000207 </copy>
ndaib8cedc82005-09-13 18:00:32 +0000208
david_williamsc84ab8c2006-12-11 18:50:34 +0000209 <!--copy buildnotes from plugin directories-->
david_williamsb7db8ba2007-02-19 01:54:04 +0000210 <mkdir dir="${resultDir}/buildnotes" />
david_williams8f37c5e2007-10-01 01:05:18 +0000211 <copy
212 todir="${resultDir}/buildnotes"
213 flatten="true">
214 <fileset
215 dir="${buildDirectory}/plugins"
216 includes="**/buildnotes_*.html" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000217 </copy>
david_williams50f2a4a2007-01-02 05:02:05 +0000218
david_williams8f37c5e2007-10-01 01:05:18 +0000219
220 <copy
221 file="${templateDir}/staticDropFiles/logIndex.php"
222 tofile="${resultDir}/testResults/consolelogs/full/logIndex.php" />
223 <copy
224 file="${templateDir}/staticDropFiles/logIndex.php"
225 tofile="${resultDir}/testResults/consolelogs/testLogs/logIndex.php" />
226 <copy
227 file="${templateDir}/staticDropFiles/logIndex.php"
228 tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php" />
229
230
231 </target>
232
233 <target name="updateSite">
234
235
236 <!-- get our authored, tokenized site.xml file -->
237 <copy
238 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/siteWTP.xml"
239 tofile="${buildDirectory}/${buildLabel}/updateSite/site.xml"
240 overwrite="true"
241 failonerror="true" />
242 <!-- get the ${buildDirectory}/finalPluginsVersions.properties, and
243 read as properties -->
244 <!-- substitute property value for tokens -->
245 <replace
246 file="${buildDirectory}/${buildLabel}/updateSite/site.xml"
247 propertyfile="${buildDirectory}/finalFeaturesVersions.properties">
248 <replacefilter
249 token="@org.eclipse.wst@"
250 property="org.eclipse.wst" />
251 <replacefilter
252 token="@org.eclipse.wst.sdk@"
253 property="org.eclipse.wst.sdk" />
254 <replacefilter
255 token="@org.eclipse.jst@"
256 property="org.eclipse.jst" />
257 <replacefilter
258 token="@org.eclipse.jst.sdk@"
259 property="org.eclipse.jst.sdk" />
260
261 <replacefilter
262 token="@org.eclipse.jpt.feature@"
263 property="org.eclipse.jpt.feature" />
264 <replacefilter
265 token="@org.eclipse.jpt_sdk.feature@"
266 property="org.eclipse.jpt_sdk.feature" />
david_williams50f2a4a2007-01-02 05:02:05 +0000267 </replace>
268
269 </target>
ndaib8cedc82005-09-13 18:00:32 +0000270
david_williamsc84ab8c2006-12-11 18:50:34 +0000271 <target name="countFiles">
david_williams0b45fcf2007-03-29 15:28:18 +0000272 <!--
david_williams8f37c5e2007-10-01 01:05:18 +0000273 files.count is a file that should exist in the drop directory with a count of the zip files in the same directory.
david_williamsa76816d2006-12-11 20:10:22 +0000274 It is required to generate a link to the build on the downloads page.
david_williamsa76816d2006-12-11 20:10:22 +0000275 -->
ndaib8cedc82005-09-13 18:00:32 +0000276
david_williams8f37c5e2007-10-01 01:05:18 +0000277 <countBuildFiles
278 sourceDirectory="${resultDir}"
279 filterString=".zip,.tar.gz"
280 outputFile="${resultDir}/files.count" />
ndaib8cedc82005-09-13 18:00:32 +0000281
david_williamsc84ab8c2006-12-11 18:50:34 +0000282 </target>
ndaib8cedc82005-09-13 18:00:32 +0000283
david_williamsc84ab8c2006-12-11 18:50:34 +0000284 <!--Build type descriptors-->
285 <target name="I">
david_williams8f37c5e2007-10-01 01:05:18 +0000286 <replace
287 file="${resultingIndex}"
288 token="%wtpandprereqs%"
289 value=" " />
290 <replace
291 file="${resultingIndex}"
292 token="@type@"
293 value="Integration" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000294 </target>
ndaib8cedc82005-09-13 18:00:32 +0000295
david_williamsc84ab8c2006-12-11 18:50:34 +0000296 <target name="S">
david_williams8f37c5e2007-10-01 01:05:18 +0000297 <replace
298 file="${resultingIndex}"
299 token="%wtpandprereqs%"
300 value=" " />
301 <replace
302 file="${resultingIndex}"
303 token="@type@"
304 value="Stable" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000305 </target>
ndaib8cedc82005-09-13 18:00:32 +0000306
david_williamsc84ab8c2006-12-11 18:50:34 +0000307 <target name="N">
david_williams8f37c5e2007-10-01 01:05:18 +0000308 <replace
309 file="${resultingIndex}"
310 token="%wtpandprereqs%"
311 value=" " />
312 <replace
313 file="${resultingIndex}"
314 token="@type@"
315 value="Nightly" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000316 </target>
ndaib8cedc82005-09-13 18:00:32 +0000317
david_williamsc84ab8c2006-12-11 18:50:34 +0000318 <target name="M">
david_williams8f37c5e2007-10-01 01:05:18 +0000319 <replace
320 file="${resultingIndex}"
321 token="%wtpandprereqs%"
322 value=" " />
323 <replace
324 file="${resultingIndex}"
325 token="@type@"
326 value="Maintenance" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000327 </target>
ndaib8cedc82005-09-13 18:00:32 +0000328
david_williamsc84ab8c2006-12-11 18:50:34 +0000329 <target name="R">
david_williams8f37c5e2007-10-01 01:05:18 +0000330 <replace
331 file="${resultingIndex}"
332 token="%wtpandprereqs%"
333 value=" " />
334 <replace
335 file="${resultingIndex}"
336 token="@type@"
337 value="Release" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000338 </target>
ndaib8cedc82005-09-13 18:00:32 +0000339
340
david_williamsc84ab8c2006-12-11 18:50:34 +0000341 <target name="T">
david_williams8f37c5e2007-10-01 01:05:18 +0000342 <replace
343 file="${resultingIndex}"
344 token="%wtpandprereqs%"
345 value=" " />
346 <replace
347 file="${resultingIndex}"
348 token="@type@"
349 value="Test" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000350 </target>
david_williams8f37c5e2007-10-01 01:05:18 +0000351
352
david_williamsb7db8ba2007-02-19 01:54:04 +0000353 <target name="checkIfTested">
david_williams8f37c5e2007-10-01 01:05:18 +0000354 <echo
355 level="debug"
356 message="isBuildTested: ${isBuildTested}" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000357 <condition property="doTests">
david_williams8f37c5e2007-10-01 01:05:18 +0000358 <equals
359 arg1="${isBuildTested}"
360 arg2="true"
361 trim="true"
362 casesensitive="false" />
david_williamsb7db8ba2007-02-19 01:54:04 +0000363 </condition>
364 </target>
david_williams8f37c5e2007-10-01 01:05:18 +0000365
366
367 <target name="writeData">
368 <!-- Insert Build Date -->
369 <replace
370 file="${resultingIndex}"
371 token="@date@"
372 value="${TODAY}" />
373
374 <!-- Insert Build Name -->
375 <replace
376 file="${resultingIndex}"
377 token="@build@"
378 value="${buildLabel}" />
379
380 <replace
381 file="${resultingIndex}"
382 token="@buildBranch@"
383 value="${buildBranch}" />
384
385 <!-- Insert PreRequsites -->
386
387 <replace
388 file="${resultingIndex}"
389 token="@eclipseFile@"
390 value="${eclipse.file.linux-gtk-x86}" />
391 <replace
392 file="${resultingIndex}"
393 token="@eclipseURL@"
394 value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
395 <replace
396 file="${resultingIndex}"
397 token="@eclipseBuildURL@"
398 value="${eclipse.url}" />
399 <replace
400 file="${resultingIndex}"
401 token="@emfFile@"
402 value="${emf.file}" />
403 <replace
404 file="${resultingIndex}"
405 token="@emfURL@"
406 value="${emf.url}/${emf.file}" />
407 <replace
408 file="${resultingIndex}"
409 token="@gefFile@"
410 value="${gef.file}" />
411 <replace
412 file="${resultingIndex}"
413 token="@gefURL@"
414 value="${gef.url}/${gef.file}" />
415 <replace
416 file="${resultingIndex}"
417 token="@jemFile@"
418 value="${jem.file}" />
419 <replace
420 file="${resultingIndex}"
421 token="@jemURL@"
422 value="${jem.url}/${jem.file}" />
423 <!--
424 these token/s should not exist in maintenance stream, but
425 no harm done, so in the interests of keeping builder
426 streams in sync, we'll leave them here as place hold
427 -->
428 <replace
429 file="${resultingIndex}"
430 token="@dtpFile@"
431 value="${dtp.file}" />
432 <replace
433 file="${resultingIndex}"
434 token="@dtpURL@"
435 value="${dtp.url}/${dtp.file}" />
436</target>
437
ndaib8cedc82005-09-13 18:00:32 +0000438
439</project>