blob: 94802b61d32933f088be1ad71b610e96da622756 [file] [log] [blame]
<project name="Publish Build" default="default" basedir=".">
<!-- 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 name="result"
value="${buildDirectory}/${buildLabel}" />
<!--name of generated index page-->
<property name="indexFileName" value="index.php" />
<target name="default">
<antcall target="countFiles" />
<antcall target="generateIndex" />
<antcall target="getStaticFiles" />
<antcall target="updateSite" />
</target>
<target name="generateIndex">
<property name="class"
value="org.eclipse.releng.generators.TestResultsGenerator" />
<taskdef name="indexResults" classname="${class}" />
<!--
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/releng/maps/dependencies.properties" />
<!-- create table of test plugin compiles first -->
<!-- set isBuildTested to true for the "compile only" results -->
<indexResults isBuildTested="true"
dropTokenList="${dropTokenList}"
xmlDirectoryName=""
dropDirectoryName="${result}"
testResultsTemplateFileName="${basedir}/templateFiles/testCompileResults.php.template"
dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
testResultsHtmlFileName="testCompileResults.php"
dropHtmlFileName="${indexFileName}"
hrefTestResultsTargetPath=""
hrefCompileLogsTargetPath="testcompilelogs"
compileLogsDirectoryName="${result}/testcompilelogs"
testManifestFileName="${basedir}/testManifest.xml" />
<!-- create table of code plugins compiles and test results second -->
<indexResults isBuildTested="${isBuildTested}"
dropTokenList="${dropTokenList}"
xmlDirectoryName="${result}/testResults/xml"
dropDirectoryName="${result}"
testResultsTemplateFileName="${basedir}/templateFiles/testResults.php.template"
dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
testResultsHtmlFileName="testResults.php"
dropHtmlFileName="${indexFileName}"
hrefTestResultsTargetPath="testResults/html"
hrefCompileLogsTargetPath="compilelogs"
compileLogsDirectoryName="${result}/compilelogs"
testManifestFileName="${basedir}/testManifest.xml" />
<indexResults isBuildTested="${isBuildTested}"
dropTokenList="${dropTokenList}"
xmlDirectoryName=""
dropDirectoryName="${result}"
testResultsTemplateFileName="${basedir}/templateFiles/testCompileResults.php.template"
dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
testResultsHtmlFileName="testCompileResults.php"
dropHtmlFileName="${indexFileName}"
hrefTestResultsTargetPath=""
hrefCompileLogsTargetPath="testcompilelogs"
compileLogsDirectoryName="${result}/testcompilelogs"
testManifestFileName="${basedir}/testManifest.xml" />
<tstamp>
<format property="TODAY"
pattern="MMMM d, yyyy" />
</tstamp>
<!-- Insert Build Type descriptor -->
<antcall target="${buildType}" />
<!-- Insert Build Date -->
<replace file="${result}/${indexFileName}"
token="@date@"
value="${TODAY}" />
<!-- Insert Build Name -->
<replace file="${result}/${indexFileName}"
token="@build@"
value="${buildLabel}" />
<!-- Insert Mirror Name -->
<replace file="${result}/${indexFileName}"
token="@mirror@"
value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" />
<!-- Insert PreRequsites -->
<replace file="${result}/${indexFileName}"
token="@eclipseFile@"
value="${eclipse.file.linux-gtk-x86}" />
<replace file="${result}/${indexFileName}"
token="@eclipseURL@"
value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
<replace file="${result}/${indexFileName}"
token="@eclipseBuildURL@"
value="${eclipse.url}" />
<replace file="${result}/${indexFileName}"
token="@emfFile@"
value="${emf.file}" />
<replace file="${result}/${indexFileName}"
token="@emfURL@"
value="${emf.url}/${emf.file}" />
<replace file="${result}/${indexFileName}"
token="@gefFile@"
value="${gef.file}" />
<replace file="${result}/${indexFileName}"
token="@gefURL@"
value="${gef.url}/${gef.file}" />
<replace file="${result}/${indexFileName}"
token="@jemFile@"
value="${jem.file}" />
<replace file="${result}/${indexFileName}"
token="@jemURL@"
value="${jem.url}/${jem.file}" />
<!--
these token/s should not exist in maintenance stream, but
no harm done, so in the interests of keeping builder
streams in sync, we'll leave them here as place hold
-->
<replace file="${result}/${indexFileName}"
token="@dtpFile@"
value="${dtp.file}" />
<replace file="${result}/${indexFileName}"
token="@dtpURL@"
value="${dtp.url}/${dtp.file}" />
<mkdir dir="${result}/whatisfixed" />
<echo file="${result}/whatisfixed/buglog.html"
append="true">
what is fixed list is not available yet!
</echo>
<!-- Update timestamp on file to permit overwrite through Ant copy task -->
<touch file="${result}/${indexFileName}" />
</target>
<target name="getStaticFiles">
<!--get static files required in the buildLabel directory-->
<copy todir="${result}">
<fileset dir="${basedir}/staticDropFiles" />
</copy>
<!--copy buildnotes from plugin directories-->
<mkdir dir="${result}/buildnotes" />
<copy todir="${result}/buildnotes" flatten="true">
<fileset dir="${buildDirectory}/plugins"
includes="**/buildnotes_*.html" />
</copy>
</target>
<target name="updateSite">
<!-- get our authored, tokenized site.xml file -->
<copy file="${wtp.builder.home}/distribution/wtp.site/templateFiles/siteWTP.xml"
tofile="${buildDirectory}/${buildLabel}/updateSite/site.xml" overwrite="true" failonerror="true"/>
<!-- get the ${buildDirectory}/finalPluginsVersions.properties, and
read as properties -->
<!-- substitute property value for tokens -->
<replace file="${buildDirectory}/${buildLabel}/updateSite/site.xml"
propertyfile="${buildDirectory}/finalFeaturesVersions.properties" >
<replacefilter token="@org.eclipse.wst@"
property="org.eclipse.wst" />
<replacefilter token="@org.eclipse.wst.sdk@"
property="org.eclipse.wst.sdk" />
<replacefilter token="@org.eclipse.jst@"
property="org.eclipse.jst" />
<replacefilter token="@org.eclipse.jst.sdk@"
property="org.eclipse.jst.sdk" />
<replacefilter token="@org.eclipse.jst.jsf.feature@"
property="org.eclipse.jst.jsf.feature" />
<replacefilter token="@org.eclipse.jst.jsf_sdk.feature@"
property="org.eclipse.jst.jsf_sdk.feature" />
<replacefilter token="@org.eclipse.jst.jpa.feature@"
property="org.eclipse.jst.jpa.feature" />
<replacefilter token="@org.eclipse.jst.jpa_sdk.feature@"
property="org.eclipse.jst.jpa_sdk.feature" />
</replace>
</target>
<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.
Added remove .zip.MD5 - old files before a count
-->
<delete>
<fileset dir="${result}" id="id">
<include name="*.MD5" />
</fileset>
</delete>
<taskdef name="countFiles"
classname="org.eclipse.releng.generators.FileCounter" />
<countFiles sourceDirectory="${result}"
filterString=".zip,.tar.gz"
outputFile="${result}/files.count" />
</target>
<!--Build type descriptors-->
<target name="I">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Integration" />
</target>
<target name="S">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Stable" />
</target>
<target name="N">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Nightly" />
</target>
<target name="M">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Maintenance" />
</target>
<target name="R">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Release" />
</target>
<target name="T">
<replace file="${result}/${indexFileName}"
token="%wtpandprereqs%"
value=" " />
<replace file="${result}/${indexFileName}"
token="@type@"
value="Test" />
</target>
</project>