blob: 68cc9e1ff89db168aaa0d6a95b46782b5c1337f0 [file] [log] [blame]
david_williams53a2f7b2008-01-08 06:11:49 +00001<project
2 name="Publish Build"
3 default="default"
4 basedir=".">
5
david_williams50c310b2008-04-09 03:17:14 +00006 <!-- Properties that must be passed to this script:
david_williams53a2f7b2008-01-08 06:11:49 +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_williams50c310b2008-04-09 03:17:14 +000012 <property
13 environment="env" />
david_williams53a2f7b2008-01-08 06:11:49 +000014 <property
david_williams53a2f7b2008-01-08 06:11:49 +000015 name="resultDir"
16 value="${buildDirectory}/${buildLabel}" />
david_williams50c310b2008-04-09 03:17:14 +000017 <!--name of generated index page-->
david_williams53a2f7b2008-01-08 06:11:49 +000018 <property
19 name="indexFileName"
20 value="index.php" />
david_williams53a2f7b2008-01-08 06:11:49 +000021 <property
22 name="templateDir"
david_williamse898cb12008-01-10 07:00:21 +000023 value="${wtp.builder.home}/distribution/${build.distribution}.site" />
david_williams53a2f7b2008-01-08 06:11:49 +000024 <property
25 name="resultingIndex"
26 value="${resultDir}/${indexFileName}" />
david_williams53a2f7b2008-01-08 06:11:49 +000027 <echo
28 level="debug"
29 message="resultDir: ${resultDir}" />
30 <echo
31 level="debug"
32 message="templateDir: ${templateDir}" />
33 <echo
34 level="debug"
35 message="resultingIndex: ${resultingIndex}" />
david_williams50c310b2008-04-09 03:17:14 +000036 <target
37 name="default">
david_williams53a2f7b2008-01-08 06:11:49 +000038 <copy
39 overwrite="true"
david_williamse898cb12008-01-10 07:00:21 +000040 file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/${indexTemplateFilename}"
david_williams53a2f7b2008-01-08 06:11:49 +000041 tofile="${resultingIndex}" />
david_williams50c310b2008-04-09 03:17:14 +000042 <antcall
43 target="countFiles" />
44 <antcall
45 target="generateCompileIndex" />
46 <antcall
47 target="generateJUnitTestsIndex" />
48 <antcall
49 target="getStaticFiles" />
david_williams53a2f7b2008-01-08 06:11:49 +000050 </target>
david_williams50c310b2008-04-09 03:17:14 +000051 <target
52 name="generateCompileIndex">
david_williams53a2f7b2008-01-08 06:11:49 +000053
54
david_williams50c310b2008-04-09 03:17:14 +000055 <!--
david_williams53a2f7b2008-01-08 06:11:49 +000056 <taskdef name="indexResults" classname="org.eclipse.wtp.releng.tools.ResultsSummaryGenerator" />
57 -->
58
david_williams50c310b2008-04-09 03:17:14 +000059 <!--
david_williams53a2f7b2008-01-08 06:11:49 +000060 isBuildTested: true|false should JUnit plugin test results be used to generate index page
61 dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
62 xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
63 dropDirectoryName: path to directory containing the result of the build.
64 testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results
65 testResultsHtmlFileName: name of file which will be generated with links to JUnit test results
66 dropHtmlFileName: name of generated index page
67 hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results
68 hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs
69 testManifestFileName: name of xml file containing descriptions of zip types and log files
70
71
72
73 -->
74 <property
david_williamsa71ad9c2008-01-11 04:02:52 +000075 file="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
david_williams53a2f7b2008-01-08 06:11:49 +000076
david_williams50c310b2008-04-09 03:17:14 +000077 <!-- create tables of test plugin compiles first -->
78 <antcall
79 target="generateCompileOutput">
80 <param
81 name="outputDirectory"
82 value="${resultDir}/testcompilelogs" />
83 </antcall>
david_williams53a2f7b2008-01-08 06:11:49 +000084
david_williams50c310b2008-04-09 03:17:14 +000085 <!-- create table of code plugins compiles -->
86 <summarizeResults
87 isBuildTested="false"
88 includeAll="true"
89 dropTokenList="${dropTokenList}"
90 xmlDirectoryName=""
91 dropDirectoryName="${resultDir}"
92 testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template"
93 testResultsHtmlFileName="compileResults.php"
94 hrefTestResultsTargetPath="testResults/html"
95 hrefCompileLogsTargetPath="compilelogs"
96 compileLogsDirectoryName="${resultDir}/compilelogs" />
97 <xslt
98 basedir="${resultDir}/compilelogs"
99 destdir="${resultDir}/compilelogs"
100 includes="**/*.bin.xml"
101 scanincludeddirectories="true"
102 style="compilerXMLOutputToHTML.xsl"
103 force="true" />
104 <tstamp>
105 <format
106 property="TODAY"
107 pattern="MMMM d, yyyy" />
108 </tstamp>
109
110 <!-- Insert Build Type descriptor -->
111 <antcall
112 target="${buildType}" />
113 <antcall
114 target="writeData" />
115
116 <!-- Update timestamp on file to permit overwrite through Ant copy task -->
117 <touch
118 file="${resultingIndex}" />
119 </target>
120 <target
121 name="generateCompileOutput"
122 depends="checkIfCompileLogs"
123 if="doCompileLogs">
124 <summarizeResults
125 isBuildTested="false"
126 includeAll="true"
127 dropTokenList="${dropTokenList}"
128 xmlDirectoryName=""
129 dropDirectoryName="${resultDir}"
130 testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template"
131 testResultsHtmlFileName="testCompileResults.php"
132 hrefTestResultsTargetPath=""
133 hrefCompileLogsTargetPath="testcompilelogs"
134 compileLogsDirectoryName="${outputDirectory}" />
135 <xslt
136 basedir="${outputDirectory}"
137 destdir="${outputDirectory}"
138 includes="**/*.bin.xml"
139 scanincludeddirectories="true"
140 style="compilerXMLOutputToHTML.xsl"
141 force="true" />
142 </target>
143 <target
144 name="generateJUnitTestsIndex"
145 depends="checkIfTested"
146 if="doTests">
147
148 <!--
149 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 -->
163 <property
164 file="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
165
166 <!-- create table of test plugin compiles first -->
167 <!-- set isBuildTested to true for the "compile only" results -->
david_williams53a2f7b2008-01-08 06:11:49 +0000168 <summarizeResults
169 isBuildTested="true"
170 dropTokenList="${dropTokenList}"
171 dropDirectoryName="${resultDir}"
172 xmlDirectoryName="${resultDir}/testResults/xml"
173 testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template"
174 testResultsHtmlFileName="testResults.php"
175 hrefTestResultsTargetPath="testResults/html"
176 compileLogsDirectoryName="" />
david_williams53a2f7b2008-01-08 06:11:49 +0000177 <tstamp>
178 <format
179 property="TODAY"
180 pattern="MMMM d, yyyy" />
181 </tstamp>
182
david_williams50c310b2008-04-09 03:17:14 +0000183 <!-- Insert Build Type descriptor -->
184 <antcall
185 target="${buildType}" />
186 <antcall
187 target="writeData" />
david_williams53a2f7b2008-01-08 06:11:49 +0000188
david_williams50c310b2008-04-09 03:17:14 +0000189 <!-- Update timestamp on file to permit overwrite through Ant copy task -->
190 <touch
191 file="${resultingIndex}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000192 </target>
david_williams50c310b2008-04-09 03:17:14 +0000193 <target
194 name="getStaticFiles">
195 <!--get static files required in the buildLabel directory-->
196 <copy
197 todir="${resultDir}">
198 <fileset
199 dir="${templateDir}/staticDropFiles" />
david_williams53a2f7b2008-01-08 06:11:49 +0000200 </copy>
201
david_williams50c310b2008-04-09 03:17:14 +0000202 <!--copy buildnotes from plugin directories-->
203 <mkdir
204 dir="${resultDir}/buildnotes" />
david_williams53a2f7b2008-01-08 06:11:49 +0000205 <copy
206 todir="${resultDir}/buildnotes"
207 flatten="true">
208 <fileset
209 dir="${buildDirectory}/plugins"
210 includes="**/buildnotes_*.html" />
211 <fileset
212 dir="${buildDirectory}/features"
213 includes="**/buildnotes_*.html" />
214 </copy>
david_williams53a2f7b2008-01-08 06:11:49 +0000215 <copy
216 file="${templateDir}/staticDropFiles/logIndex.php"
217 tofile="${resultDir}/testResults/consolelogs/full/logIndex.php" />
218 <copy
219 file="${templateDir}/staticDropFiles/logIndex.php"
220 tofile="${resultDir}/testResults/consolelogs/testLogs/logIndex.php" />
221 <copy
222 file="${templateDir}/staticDropFiles/logIndex.php"
223 tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php" />
david_williams53a2f7b2008-01-08 06:11:49 +0000224 </target>
david_williams50c310b2008-04-09 03:17:14 +0000225 <target
226 name="updateSite">
david_williams53a2f7b2008-01-08 06:11:49 +0000227
228
david_williams50c310b2008-04-09 03:17:14 +0000229 <!-- get our authored, tokenized site.xml file -->
david_williams53a2f7b2008-01-08 06:11:49 +0000230 <copy
david_williamse898cb12008-01-10 07:00:21 +0000231 file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/siteWTP.xml"
david_williams53a2f7b2008-01-08 06:11:49 +0000232 tofile="${buildDirectory}/${buildLabel}/updateSite/site.xml"
233 overwrite="true"
234 failonerror="true" />
david_williams50c310b2008-04-09 03:17:14 +0000235 <!-- get the ${buildDirectory}/finalPluginsVersions.properties, and
david_williams53a2f7b2008-01-08 06:11:49 +0000236 read as properties -->
david_williams50c310b2008-04-09 03:17:14 +0000237 <!-- substitute property value for tokens -->
david_williams53a2f7b2008-01-08 06:11:49 +0000238 <replace
239 file="${buildDirectory}/${buildLabel}/updateSite/site.xml"
240 propertyfile="${buildDirectory}/finalFeaturesVersions.properties">
241 <replacefilter
242 token="@org.eclipse.wst@"
243 property="org.eclipse.wst" />
244 <replacefilter
245 token="@org.eclipse.wst.sdk@"
246 property="org.eclipse.wst.sdk" />
247 <replacefilter
248 token="@org.eclipse.jst@"
249 property="org.eclipse.jst" />
250 <replacefilter
251 token="@org.eclipse.jst.sdk@"
252 property="org.eclipse.jst.sdk" />
david_williams53a2f7b2008-01-08 06:11:49 +0000253 <replacefilter
254 token="@org.eclipse.jpt.feature@"
255 property="org.eclipse.jpt.feature" />
256 <replacefilter
257 token="@org.eclipse.jpt_sdk.feature@"
258 property="org.eclipse.jpt_sdk.feature" />
259 </replace>
david_williams53a2f7b2008-01-08 06:11:49 +0000260 </target>
david_williams50c310b2008-04-09 03:17:14 +0000261 <target
262 name="countFiles">
263 <!--
david_williams53a2f7b2008-01-08 06:11:49 +0000264 files.count is a file that should exist in the drop directory with a count of the zip files in the same directory.
265 It is required to generate a link to the build on the downloads page.
266 -->
david_williams53a2f7b2008-01-08 06:11:49 +0000267 <countBuildFiles
268 sourceDirectory="${resultDir}"
269 filterString=".zip,.tar.gz"
270 outputFile="${resultDir}/files.count" />
david_williams53a2f7b2008-01-08 06:11:49 +0000271 </target>
272
david_williams50c310b2008-04-09 03:17:14 +0000273 <!--Build type descriptors-->
274 <target
275 name="I">
david_williams53a2f7b2008-01-08 06:11:49 +0000276 <replace
277 file="${resultingIndex}"
278 token="%wtpandprereqs%"
279 value=" " />
280 <replace
281 file="${resultingIndex}"
282 token="@type@"
283 value="Integration" />
284 </target>
david_williams50c310b2008-04-09 03:17:14 +0000285 <target
286 name="S">
david_williams53a2f7b2008-01-08 06:11:49 +0000287 <replace
288 file="${resultingIndex}"
289 token="%wtpandprereqs%"
290 value=" " />
291 <replace
292 file="${resultingIndex}"
293 token="@type@"
294 value="Stable" />
295 </target>
david_williams50c310b2008-04-09 03:17:14 +0000296 <target
297 name="N">
david_williams53a2f7b2008-01-08 06:11:49 +0000298 <replace
299 file="${resultingIndex}"
300 token="%wtpandprereqs%"
301 value=" " />
302 <replace
303 file="${resultingIndex}"
304 token="@type@"
305 value="Nightly" />
306 </target>
david_williams50c310b2008-04-09 03:17:14 +0000307 <target
308 name="M">
david_williams53a2f7b2008-01-08 06:11:49 +0000309 <replace
310 file="${resultingIndex}"
311 token="%wtpandprereqs%"
312 value=" " />
313 <replace
314 file="${resultingIndex}"
315 token="@type@"
316 value="Maintenance" />
317 </target>
david_williams50c310b2008-04-09 03:17:14 +0000318 <target
319 name="R">
david_williams53a2f7b2008-01-08 06:11:49 +0000320 <replace
321 file="${resultingIndex}"
322 token="%wtpandprereqs%"
323 value=" " />
324 <replace
325 file="${resultingIndex}"
326 token="@type@"
327 value="Release" />
328 </target>
david_williams50c310b2008-04-09 03:17:14 +0000329 <target
330 name="T">
david_williams53a2f7b2008-01-08 06:11:49 +0000331 <replace
332 file="${resultingIndex}"
333 token="%wtpandprereqs%"
334 value=" " />
335 <replace
336 file="${resultingIndex}"
337 token="@type@"
338 value="Test" />
339 </target>
david_williams50c310b2008-04-09 03:17:14 +0000340 <target
341 name="P">
david_williams53a2f7b2008-01-08 06:11:49 +0000342 <replace
343 file="${resultingIndex}"
344 token="%wtpandprereqs%"
345 value=" " />
346 <replace
347 file="${resultingIndex}"
348 token="@type@"
349 value="Patches" />
350 </target>
david_williams50c310b2008-04-09 03:17:14 +0000351 <target
352 name="checkIfTested">
david_williams53a2f7b2008-01-08 06:11:49 +0000353 <echo
354 level="debug"
355 message="isBuildTested: ${isBuildTested}" />
david_williams50c310b2008-04-09 03:17:14 +0000356 <condition
357 property="doTests">
david_williams53a2f7b2008-01-08 06:11:49 +0000358 <equals
359 arg1="${isBuildTested}"
360 arg2="true"
361 trim="true"
362 casesensitive="false" />
363 </condition>
364 </target>
david_williams50c310b2008-04-09 03:17:14 +0000365 <target
366 name="checkIfCompileLogs">
367 <condition
368 property="doCompileLogs">
369 <available
david_williams55ac7972008-04-09 03:23:16 +0000370 file="${outputDirectory}" />
david_williams50c310b2008-04-09 03:17:14 +0000371 </condition>
372 </target>
373 <target
374 name="writeData">
375 <!-- Insert Build Date -->
david_williams53a2f7b2008-01-08 06:11:49 +0000376 <replace
377 file="${resultingIndex}"
378 token="@date@"
379 value="${TODAY}" />
380
david_williams50c310b2008-04-09 03:17:14 +0000381 <!-- Insert Build Name -->
david_williams53a2f7b2008-01-08 06:11:49 +0000382 <replace
383 file="${resultingIndex}"
384 token="@build@"
385 value="${buildLabel}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000386 <replace
387 file="${resultingIndex}"
388 token="@buildBranch@"
389 value="${buildBranch}" />
390
david_williams50c310b2008-04-09 03:17:14 +0000391 <!-- Insert PreRequsites -->
david_williams53a2f7b2008-01-08 06:11:49 +0000392 <replace
393 file="${resultingIndex}"
394 token="@eclipseFile@"
395 value="${eclipse.file.linux-gtk-x86}" />
396 <replace
397 file="${resultingIndex}"
398 token="@eclipseURL@"
399 value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
400 <replace
401 file="${resultingIndex}"
402 token="@eclipseBuildURL@"
403 value="${eclipse.url}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000404 <replace
405 file="${resultingIndex}"
406 token="@eclipsefilelinux@"
407 value="${eclipse.file.linux-gtk-x86}" />
408 <replace
409 file="${resultingIndex}"
410 token="@eclipsefilewindows@"
411 value="${eclipse.file.win32-win32-x86}" />
412 <replace
413 file="${resultingIndex}"
414 token="@eclipsefilemacos@"
415 value="${eclipse.file.macosx-carbon-ppc}" />
416 <replace
417 file="${resultingIndex}"
418 token="@eclipseBuildHome@"
419 value="${eclipse.build.home}" />
420 <replace
421 file="${resultingIndex}"
422 token="@eclipse.mirror.prefixuri@"
423 value="${eclipse.mirror.prefixuri}" />
david_williams50c310b2008-04-09 03:17:14 +0000424 <replace
425 file="${resultingIndex}"
426 token="@eclipse.fspath.prefix@"
427 value="${eclipse.fspath.prefix}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000428 <replace
429 file="${resultingIndex}"
430 token="@testURL@"
431 value="${eclipseTestFramework.url}/${eclipseTestFramework.file}" />
432 <replace
433 file="${resultingIndex}"
434 token="@testFile@"
435 value="${eclipseTestFramework.file}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000436 <replace
437 file="${resultingIndex}"
438 token="@emfFile@"
439 value="${emf.file}" />
440 <replace
441 file="${resultingIndex}"
442 token="@emfURL@"
443 value="${emf.url}/${emf.file}" />
444 <replace
445 file="${resultingIndex}"
446 token="@emfBuildHome@"
447 value="${emf.build.home}" />
448 <replace
449 file="${resultingIndex}"
450 token="@emf.mirror.prefixuri@"
451 value="${emf.mirror.prefixuri}" />
david_williams50c310b2008-04-09 03:17:14 +0000452 <replace
453 file="${resultingIndex}"
454 token="@wstFile@"
455 value="${wst.file}" />
456 <replace
457 file="${resultingIndex}"
458 token="@wstURL@"
459 value="${wst.url}/${wst.file}" />
460 <replace
461 file="${resultingIndex}"
462 token="@wstBuildHome@"
463 value="${wst.build.home}" />
464 <replace
465 file="${resultingIndex}"
466 token="@wst.mirror.prefixuri@"
467 value="${wst.mirror.prefixuri}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000468 <replace
469 file="${resultingIndex}"
470 token="@gefFile@"
471 value="${gef.file}" />
472 <replace
473 file="${resultingIndex}"
474 token="@gefURL@"
475 value="${gef.url}/${gef.file}" />
476 <replace
477 file="${resultingIndex}"
478 token="@gefBuildHome@"
479 value="${gef.build.home}" />
480 <replace
481 file="${resultingIndex}"
482 token="@gef.mirror.prefixuri@"
483 value="${gef.mirror.prefixuri}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000484 <replace
485 file="${resultingIndex}"
486 token="@eclipserelengFile@"
487 value="${eclipsereleng.file}" />
488 <replace
489 file="${resultingIndex}"
490 token="@eclipserelengURL@"
491 value="${eclipsereleng.url}/${eclipsereleng.file}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000492 <replace
493 file="${resultingIndex}"
494 token="@orbitthirdpartyzipFile@"
495 value="${orbitthirdpartyzip.file}" />
496 <replace
497 file="${resultingIndex}"
498 token="@orbitthirdpartyzipURL@"
499 value="${orbitthirdpartyzip.url}/${orbitthirdpartyzip.file}" />
500 <replace
501 file="${resultingIndex}"
502 token="@orbitthirdpartyzipBuildHome@"
503 value="${orbitthirdpartyzip.build.home}" />
504 <replace
505 file="${resultingIndex}"
506 token="@orbitthirdpartyzip.mirror.prefixuri@"
507 value="${orbitthirdpartyzip.mirror.prefixuri}" />
508
509
david_williams50c310b2008-04-09 03:17:14 +0000510 <!-- no longer used. Post 1.5.5 -->
david_williams53a2f7b2008-01-08 06:11:49 +0000511 <replace
512 file="${resultingIndex}"
513 token="@jemFile@"
514 value="${jem.file}" />
515 <replace
516 file="${resultingIndex}"
517 token="@jemURL@"
518 value="${jem.url}/${jem.file}" />
519 <replace
520 file="${resultingIndex}"
521 token="@jemBuildHome@"
522 value="${jem.build.home}" />
523 <replace
524 file="${resultingIndex}"
525 token="@jem.mirror.prefixuri@"
526 value="${jem.mirror.prefixuri}" />
david_williams50c310b2008-04-09 03:17:14 +0000527 <!--
david_williams53a2f7b2008-01-08 06:11:49 +0000528 these token/s should not exist in maintenance stream, but
529 do no harm done, so in the interests of keeping builder
530 streams in sync, we'll leave them here as place hold
531 -->
532 <replace
533 file="${resultingIndex}"
534 token="@dtpFile@"
535 value="${dtp.file}" />
536 <replace
537 file="${resultingIndex}"
538 token="@dtpURL@"
539 value="${dtp.url}/${dtp.file}" />
540 <replace
541 file="${resultingIndex}"
542 token="@dtpBuildHome@"
543 value="${dtp.build.home}" />
544 <replace
545 file="${resultingIndex}"
546 token="@dtp.mirror.prefixuri@"
547 value="${dtp.mirror.prefixuri}" />
david_williams53a2f7b2008-01-08 06:11:49 +0000548 </target>
david_williams53a2f7b2008-01-08 06:11:49 +0000549</project>