attempt to make "site publishing" more resilient to missing compile output folders.
diff --git a/releng.wtpbuilder/distribution/incubator.site/publish.xml b/releng.wtpbuilder/distribution/incubator.site/publish.xml
index 701c1e6..d385415 100644
--- a/releng.wtpbuilder/distribution/incubator.site/publish.xml
+++ b/releng.wtpbuilder/distribution/incubator.site/publish.xml
@@ -3,30 +3,27 @@
default="default"
basedir=".">
- <!-- Properties that must be passed to this script:
+ <!-- Properties that must be passed to this script:
buildDirectory: Path to perform the build in. (A working directory)
buildType: Type of build (nightly, integration etc.)
buildId: Build name
buildLabel: <buildType>-<buildName>-<timestamp>
-->
-
- <property environment="env" />
-
+ <property
+ environment="env" />
<property
name="resultDir"
value="${buildDirectory}/${buildLabel}" />
- <!--name of generated index page-->
+ <!--name of generated index page-->
<property
name="indexFileName"
value="index.php" />
-
<property
name="templateDir"
value="${wtp.builder.home}/distribution/${build.distribution}.site" />
<property
name="resultingIndex"
value="${resultDir}/${indexFileName}" />
-
<echo
level="debug"
message="resultDir: ${resultDir}" />
@@ -36,109 +33,30 @@
<echo
level="debug"
message="resultingIndex: ${resultingIndex}" />
-
-
-
- <target name="default">
+ <target
+ name="default">
<copy
overwrite="true"
file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/${indexTemplateFilename}"
tofile="${resultingIndex}" />
- <antcall target="countFiles" />
- <antcall target="generateCompileIndex" />
- <antcall target="generateJUnitTestsIndex" />
- <antcall target="getStaticFiles" />
+ <antcall
+ target="countFiles" />
+ <antcall
+ target="generateCompileIndex" />
+ <antcall
+ target="generateJUnitTestsIndex" />
+ <antcall
+ target="getStaticFiles" />
</target>
-
- <target name="generateCompileIndex">
+ <target
+ name="generateCompileIndex">
- <!--
+ <!--
<taskdef name="indexResults" classname="org.eclipse.wtp.releng.tools.ResultsSummaryGenerator" />
-->
- <!--
- isBuildTested: true|false should JUnit plugin test results be used to generate index page
- dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
- xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
- dropDirectoryName: path to directory containing the result of the build.
- testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results
- testResultsHtmlFileName: name of file which will be generated with links to JUnit test results
- dropHtmlFileName: name of generated index page
- hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results
- hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs
- testManifestFileName: name of xml file containing descriptions of zip types and log files
-
-
-
- -->
- <property
- file="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
-
- <!-- create tables of test plugin compiles first -->
- <summarizeResults
- isBuildTested="false"
- includeAll="true"
- dropTokenList="${dropTokenList}"
- xmlDirectoryName=""
- dropDirectoryName="${resultDir}"
- testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template"
- testResultsHtmlFileName="testCompileResults.php"
- hrefTestResultsTargetPath=""
- hrefCompileLogsTargetPath="testcompilelogs"
- compileLogsDirectoryName="${resultDir}/testcompilelogs" />
-
- <xslt
- basedir="${resultDir}/testcompilelogs"
- destdir="${resultDir}/testcompilelogs"
- includes="**/*.bin.xml"
- scanincludeddirectories="true"
- style="compilerXMLOutputToHTML.xsl"
- force="true" />
-
- <!-- create table of code plugins compiles -->
- <summarizeResults
- isBuildTested="false"
- includeAll="true"
- dropTokenList="${dropTokenList}"
- xmlDirectoryName=""
- dropDirectoryName="${resultDir}"
- testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template"
- testResultsHtmlFileName="compileResults.php"
- hrefTestResultsTargetPath="testResults/html"
- hrefCompileLogsTargetPath="compilelogs"
- compileLogsDirectoryName="${resultDir}/compilelogs" />
-
-
- <xslt
- basedir="${resultDir}/compilelogs"
- destdir="${resultDir}/compilelogs"
- includes="**/*.bin.xml"
- scanincludeddirectories="true"
- style="compilerXMLOutputToHTML.xsl"
- force="true" />
-
- <tstamp>
- <format
- property="TODAY"
- pattern="MMMM d, yyyy" />
- </tstamp>
-
- <!-- Insert Build Type descriptor -->
- <antcall target="${buildType}" />
-
- <antcall target="writeData" />
-
- <!-- Update timestamp on file to permit overwrite through Ant copy task -->
- <touch file="${resultingIndex}" />
- </target>
-
- <target
- name="generateJUnitTestsIndex"
- depends="checkIfTested"
- if="doTests">
-
- <!--
+ <!--
isBuildTested: true|false should JUnit plugin test results be used to generate index page
dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
@@ -156,9 +74,97 @@
<property
file="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
- <!-- create table of test plugin compiles first -->
- <!-- set isBuildTested to true for the "compile only" results -->
+ <!-- create tables of test plugin compiles first -->
+ <antcall
+ target="generateCompileOutput">
+ <param
+ name="outputDirectory"
+ value="${resultDir}/testcompilelogs" />
+ </antcall>
+ <!-- create table of code plugins compiles -->
+ <summarizeResults
+ isBuildTested="false"
+ includeAll="true"
+ dropTokenList="${dropTokenList}"
+ xmlDirectoryName=""
+ dropDirectoryName="${resultDir}"
+ testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template"
+ testResultsHtmlFileName="compileResults.php"
+ hrefTestResultsTargetPath="testResults/html"
+ hrefCompileLogsTargetPath="compilelogs"
+ compileLogsDirectoryName="${resultDir}/compilelogs" />
+ <xslt
+ basedir="${resultDir}/compilelogs"
+ destdir="${resultDir}/compilelogs"
+ includes="**/*.bin.xml"
+ scanincludeddirectories="true"
+ style="compilerXMLOutputToHTML.xsl"
+ force="true" />
+ <tstamp>
+ <format
+ property="TODAY"
+ pattern="MMMM d, yyyy" />
+ </tstamp>
+
+ <!-- Insert Build Type descriptor -->
+ <antcall
+ target="${buildType}" />
+ <antcall
+ target="writeData" />
+
+ <!-- Update timestamp on file to permit overwrite through Ant copy task -->
+ <touch
+ file="${resultingIndex}" />
+ </target>
+ <target
+ name="generateCompileOutput"
+ depends="checkIfCompileLogs"
+ if="doCompileLogs">
+ <summarizeResults
+ isBuildTested="false"
+ includeAll="true"
+ dropTokenList="${dropTokenList}"
+ xmlDirectoryName=""
+ dropDirectoryName="${resultDir}"
+ testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template"
+ testResultsHtmlFileName="testCompileResults.php"
+ hrefTestResultsTargetPath=""
+ hrefCompileLogsTargetPath="testcompilelogs"
+ compileLogsDirectoryName="${outputDirectory}" />
+ <xslt
+ basedir="${outputDirectory}"
+ destdir="${outputDirectory}"
+ includes="**/*.bin.xml"
+ scanincludeddirectories="true"
+ style="compilerXMLOutputToHTML.xsl"
+ force="true" />
+ </target>
+ <target
+ name="generateJUnitTestsIndex"
+ depends="checkIfTested"
+ if="doTests">
+
+ <!--
+ isBuildTested: true|false should JUnit plugin test results be used to generate index page
+ dropTokenList: comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
+ xmlDirectoryName: path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
+ dropDirectoryName: path to directory containing the result of the build.
+ testResultsTemplateFileName: path to template file used to generate page with links to JUnit test results
+ testResultsHtmlFileName: name of file which will be generated with links to JUnit test results
+ dropHtmlFileName: name of generated index page
+ hrefTestResultsTargetPath: relative path from index page to directory containing JUnit html test results
+ hrefCompileLogsTargetPath: relative path from index page directory containing compilelogs
+ testManifestFileName: name of xml file containing descriptions of zip types and log files
+
+
+
+ -->
+ <property
+ file="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
+
+ <!-- create table of test plugin compiles first -->
+ <!-- set isBuildTested to true for the "compile only" results -->
<summarizeResults
isBuildTested="true"
dropTokenList="${dropTokenList}"
@@ -168,32 +174,34 @@
testResultsHtmlFileName="testResults.php"
hrefTestResultsTargetPath="testResults/html"
compileLogsDirectoryName="" />
-
-
<tstamp>
<format
property="TODAY"
pattern="MMMM d, yyyy" />
</tstamp>
- <!-- Insert Build Type descriptor -->
- <antcall target="${buildType}" />
+ <!-- Insert Build Type descriptor -->
+ <antcall
+ target="${buildType}" />
+ <antcall
+ target="writeData" />
- <antcall target="writeData" />
-
- <!-- Update timestamp on file to permit overwrite through Ant copy task -->
- <touch file="${resultingIndex}" />
+ <!-- Update timestamp on file to permit overwrite through Ant copy task -->
+ <touch
+ file="${resultingIndex}" />
</target>
-
-
- <target name="getStaticFiles">
- <!--get static files required in the buildLabel directory-->
- <copy todir="${resultDir}">
- <fileset dir="${templateDir}/staticDropFiles" />
+ <target
+ name="getStaticFiles">
+ <!--get static files required in the buildLabel directory-->
+ <copy
+ todir="${resultDir}">
+ <fileset
+ dir="${templateDir}/staticDropFiles" />
</copy>
- <!--copy buildnotes from plugin directories-->
- <mkdir dir="${resultDir}/buildnotes" />
+ <!--copy buildnotes from plugin directories-->
+ <mkdir
+ dir="${resultDir}/buildnotes" />
<copy
todir="${resultDir}/buildnotes"
flatten="true">
@@ -204,8 +212,6 @@
dir="${buildDirectory}/features"
includes="**/buildnotes_*.html" />
</copy>
-
-
<copy
file="${templateDir}/staticDropFiles/logIndex.php"
tofile="${resultDir}/testResults/consolelogs/full/logIndex.php" />
@@ -215,22 +221,20 @@
<copy
file="${templateDir}/staticDropFiles/logIndex.php"
tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php" />
-
-
</target>
-
- <target name="updateSite">
+ <target
+ name="updateSite">
- <!-- get our authored, tokenized site.xml file -->
+ <!-- get our authored, tokenized site.xml file -->
<copy
file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/siteWTP.xml"
tofile="${buildDirectory}/${buildLabel}/updateSite/site.xml"
overwrite="true"
failonerror="true" />
- <!-- get the ${buildDirectory}/finalPluginsVersions.properties, and
+ <!-- get the ${buildDirectory}/finalPluginsVersions.properties, and
read as properties -->
- <!-- substitute property value for tokens -->
+ <!-- substitute property value for tokens -->
<replace
file="${buildDirectory}/${buildLabel}/updateSite/site.xml"
propertyfile="${buildDirectory}/finalFeaturesVersions.properties">
@@ -246,7 +250,6 @@
<replacefilter
token="@org.eclipse.jst.sdk@"
property="org.eclipse.jst.sdk" />
-
<replacefilter
token="@org.eclipse.jpt.feature@"
property="org.eclipse.jpt.feature" />
@@ -254,24 +257,22 @@
token="@org.eclipse.jpt_sdk.feature@"
property="org.eclipse.jpt_sdk.feature" />
</replace>
-
</target>
-
- <target name="countFiles">
- <!--
+ <target
+ name="countFiles">
+ <!--
files.count is a file that should exist in the drop directory with a count of the zip files in the same directory.
It is required to generate a link to the build on the downloads page.
-->
-
<countBuildFiles
sourceDirectory="${resultDir}"
filterString=".zip,.tar.gz"
outputFile="${resultDir}/files.count" />
-
</target>
- <!--Build type descriptors-->
- <target name="I">
+ <!--Build type descriptors-->
+ <target
+ name="I">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -281,8 +282,8 @@
token="@type@"
value="Integration" />
</target>
-
- <target name="S">
+ <target
+ name="S">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -292,8 +293,8 @@
token="@type@"
value="Stable" />
</target>
-
- <target name="N">
+ <target
+ name="N">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -303,8 +304,8 @@
token="@type@"
value="Nightly" />
</target>
-
- <target name="M">
+ <target
+ name="M">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -314,8 +315,8 @@
token="@type@"
value="Maintenance" />
</target>
-
- <target name="R">
+ <target
+ name="R">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -325,9 +326,8 @@
token="@type@"
value="Release" />
</target>
-
-
- <target name="T">
+ <target
+ name="T">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -337,8 +337,8 @@
token="@type@"
value="Test" />
</target>
-
- <target name="P">
+ <target
+ name="P">
<replace
file="${resultingIndex}"
token="%wtpandprereqs%"
@@ -348,12 +348,13 @@
token="@type@"
value="Patches" />
</target>
-
- <target name="checkIfTested">
+ <target
+ name="checkIfTested">
<echo
level="debug"
message="isBuildTested: ${isBuildTested}" />
- <condition property="doTests">
+ <condition
+ property="doTests">
<equals
arg1="${isBuildTested}"
arg2="true"
@@ -361,28 +362,33 @@
casesensitive="false" />
</condition>
</target>
-
-
- <target name="writeData">
- <!-- Insert Build Date -->
+ <target
+ name="checkIfCompileLogs">
+ <condition
+ property="doCompileLogs">
+ <available
+ dir="${outputDirectory}" />
+ </condition>
+ </target>
+ <target
+ name="writeData">
+ <!-- Insert Build Date -->
<replace
file="${resultingIndex}"
token="@date@"
value="${TODAY}" />
- <!-- Insert Build Name -->
+ <!-- Insert Build Name -->
<replace
file="${resultingIndex}"
token="@build@"
value="${buildLabel}" />
-
<replace
file="${resultingIndex}"
token="@buildBranch@"
value="${buildBranch}" />
- <!-- Insert PreRequsites -->
-
+ <!-- Insert PreRequsites -->
<replace
file="${resultingIndex}"
token="@eclipseFile@"
@@ -395,7 +401,6 @@
file="${resultingIndex}"
token="@eclipseBuildURL@"
value="${eclipse.url}" />
-
<replace
file="${resultingIndex}"
token="@eclipsefilelinux@"
@@ -416,12 +421,10 @@
file="${resultingIndex}"
token="@eclipse.mirror.prefixuri@"
value="${eclipse.mirror.prefixuri}" />
-
- <replace
- file="${resultingIndex}"
- token="@eclipse.fspath.prefix@"
- value="${eclipse.fspath.prefix}" />
-
+ <replace
+ file="${resultingIndex}"
+ token="@eclipse.fspath.prefix@"
+ value="${eclipse.fspath.prefix}" />
<replace
file="${resultingIndex}"
token="@testURL@"
@@ -430,7 +433,6 @@
file="${resultingIndex}"
token="@testFile@"
value="${eclipseTestFramework.file}" />
-
<replace
file="${resultingIndex}"
token="@emfFile@"
@@ -447,24 +449,22 @@
file="${resultingIndex}"
token="@emf.mirror.prefixuri@"
value="${emf.mirror.prefixuri}" />
-
- <replace
- file="${resultingIndex}"
- token="@wstFile@"
- value="${wst.file}" />
- <replace
- file="${resultingIndex}"
- token="@wstURL@"
- value="${wst.url}/${wst.file}" />
- <replace
- file="${resultingIndex}"
- token="@wstBuildHome@"
- value="${wst.build.home}" />
- <replace
- file="${resultingIndex}"
- token="@wst.mirror.prefixuri@"
- value="${wst.mirror.prefixuri}" />
-
+ <replace
+ file="${resultingIndex}"
+ token="@wstFile@"
+ value="${wst.file}" />
+ <replace
+ file="${resultingIndex}"
+ token="@wstURL@"
+ value="${wst.url}/${wst.file}" />
+ <replace
+ file="${resultingIndex}"
+ token="@wstBuildHome@"
+ value="${wst.build.home}" />
+ <replace
+ file="${resultingIndex}"
+ token="@wst.mirror.prefixuri@"
+ value="${wst.mirror.prefixuri}" />
<replace
file="${resultingIndex}"
token="@gefFile@"
@@ -481,7 +481,6 @@
file="${resultingIndex}"
token="@gef.mirror.prefixuri@"
value="${gef.mirror.prefixuri}" />
-
<replace
file="${resultingIndex}"
token="@eclipserelengFile@"
@@ -490,7 +489,6 @@
file="${resultingIndex}"
token="@eclipserelengURL@"
value="${eclipsereleng.url}/${eclipsereleng.file}" />
-
<replace
file="${resultingIndex}"
token="@orbitthirdpartyzipFile@"
@@ -509,7 +507,7 @@
value="${orbitthirdpartyzip.mirror.prefixuri}" />
- <!-- no longer used. Post 1.5.5 -->
+ <!-- no longer used. Post 1.5.5 -->
<replace
file="${resultingIndex}"
token="@jemFile@"
@@ -526,7 +524,7 @@
file="${resultingIndex}"
token="@jem.mirror.prefixuri@"
value="${jem.mirror.prefixuri}" />
- <!--
+ <!--
these token/s should not exist in maintenance stream, but
do no harm done, so in the interests of keeping builder
streams in sync, we'll leave them here as place hold
@@ -547,8 +545,5 @@
file="${resultingIndex}"
token="@dtp.mirror.prefixuri@"
value="${dtp.mirror.prefixuri}" />
-
</target>
-
-
</project>
\ No newline at end of file