-
david_williams authoreddavid_williams authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
publish.xml 30.04 KiB
<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 environment="env"/>
<fail
unless="buildDirectory"
message="buildDirectory must be provided to publish"/>
<fail
unless="buildLabel"
message="buildLabel must be provided to publish"/>
<fail
unless="wtp.builder.home"
message="wtp.builder.home must be provided to publish"/>
<fail
unless="build.distribution"
message="build.distribution must be provided to publish"/>
<property
name="resultDir"
value="${buildDirectory}/${buildLabel}"/>
<!--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}"/>
<echo
level="debug"
message="templateDir: ${templateDir}"/>
<echo
level="debug"
message="resultingIndex: ${resultingIndex}"/>
<property
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
<available
file="${dependency.properties}"
property="dependency.properties.exists"/>
<fail
message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/>
<echo message="dependency file: ${dependency.properties}"/>
<property file="${dependency.properties}"/>
<target name="default">
<copy todir="${resultDir}">
<fileset dir="${templateDir}/templateFiles"/>
</copy>
<copy
todir="${resultDir}"
file="${buildDirectory}/maps/${env.RELENG}/distribution/${build.distribution}.site/prereqsToDisplay.php"/>
<copy
overwrite="true"
file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/${indexTemplateFilename}"
tofile="${resultingIndex}"/>
<copy
overwrite="true"
file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/components.template.php"
tofile="${resultDir}/components/components.php"/>
<antcall target="countFiles"/>
<antcall target="generateCompileIndex"/>
<antcall target="generateJUnitTestsIndex"/>
<antcall target="getStaticFiles"/>
</target>
<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
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
<available
file="${dependency.properties}"
property="dependency.properties.exists"/>
<fail
message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/>
<!-- create tables of test plugin compiles first -->
<antcall target="generateTestCompileOutput">
<param
name="outputDirectory"
value="${resultDir}/testcompilelogs"/>
</antcall>
<!-- create table of code plugins compiles -->
<antcall target="generateCompileOutput">
<param
name="outputDirectory"
value="${resultDir}/compilelogs"/>
</antcall>
<tstamp>
<format
property="TODAY"
pattern="MMMM d, yyyy"/>
</tstamp>
<antcall target="writeData"/>
<!--
Update timestamp on file to permit overwrite through Ant
copy task
-->
<touch file="${resultingIndex}"/>
</target>
<target
name="generateTestCompileOutput"
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}"/>
<antcall target="compilerXMLToHTML"/>
</target>
<target
name="generateCompileOutput"
depends="checkIfCompileLogs"
if="doCompileLogs">
<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="${outputDirectory}"/>
<antcall target="compilerXMLToHTML"/>
</target>
<target name="compilerXMLToHTML">
<xslt
basedir="${outputDirectory}"
destdir="${outputDirectory}"
includes="**/*.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
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
<available
file="${dependency.properties}"
property="dependency.properties.exists"/>
<fail
message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/>
<property file="${dependencies.properties}"/>
<!-- create table of test plugin compiles first -->
<!-- set isBuildTested to true for the "compile only" results -->
<summarizeResults
isBuildTested="true"
dropTokenList="${dropTokenList}"
dropDirectoryName="${resultDir}"
xmlDirectoryName="${resultDir}/testResults/xml"
testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template.php"
testResultsHtmlFileName="testResults.php"
hrefTestResultsTargetPath="testResults/html"
compileLogsDirectoryName=""/>
<tstamp>
<format
property="TODAY"
pattern="MMMM d, yyyy"/>
</tstamp>
<!-- Insert Build Type descriptor, I, S, etc. (php files have to expand to 'Integration', etc., as desired -->
<replace
dir="${resultDir}"
includes="**/*.php,*.xml"
token="@buildtype@"
value="${buildType}"/>
<antcall target="writeData"/>
<!--
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"/>
</copy>
<!--copy buildnotes from plugin directories-->
<mkdir dir="${resultDir}/buildnotes"/>
<copy
failonerror="false"
todir="${resultDir}/buildnotes"
flatten="true">
<fileset
dir="${buildDirectory}/plugins"
includes="**/buildnotes_*.html"/>
<fileset
dir="${buildDirectory}/features"
includes="**/buildnotes_*.html"/>
</copy>
<copy
failonerror="false"
file="${templateDir}/staticDropFiles/logIndex.php"
tofile="${resultDir}/testResults/consolelogs/full/logIndex.php"/>
<copy
failonerror="false"
file="${templateDir}/staticDropFiles/logIndex.php"
tofile="${resultDir}/testResults/consolelogs/testLogs/logIndex.php"/>
<copy
failonerror="false"
file="${templateDir}/staticDropFiles/logIndex.php"
tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php"/>
</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.
-->
<countBuildFiles
sourceDirectory="${resultDir}"
filterString=".zip,.tar.gz"
outputFile="${resultDir}/files.count"/>
</target>
<target name="checkIfTested">
<echo
level="debug"
message="isBuildTested: ${isBuildTested}"/>
<condition property="doTests">
<equals
arg1="${isBuildTested}"
arg2="true"
trim="true"
casesensitive="false"/>
</condition>
</target>
<target name="checkIfCompileLogs">
<condition property="doCompileLogs">
<available file="${outputDirectory}"/>
</condition>
<echo message="doCompileLogs: ${doCompileLogs) outputDirectory: ${outputDirectory}"/>
</target>
<target name="writeData">
<replace
dir="${resultDir}"
includes="**/*.php,*.xml"
value=""
propertyFile="${dependency.properties}">
<!-- general build info -->
<replacefilter
token="@buildtype@"
value="${buildType}"/>
<replacefilter
token="@date@"
value="${TODAY}"/>
<replacefilter
token="@build@"
value="${buildLabel}"/>
<replacefilter
token="@buildBranch@"
value="${buildBranch}"/>
<replacefilter
token="@build_distribution@"
value="${build.distribution}"/>
<!-- prereq info -->
<replacefilter
token="@eclipseplatformFile@"
property="eclipseplatform.file.linux-gtk-x86"/>
<replacefilter
token="@eclipseplatformURL@"
property="eclipseplatform.url/eclipseplatform.file.linux-gtk-x86"/>
<replacefilter
token="@eclipseplatformBuildURL@"
property="eclipseplatform.url"/>
<replacefilter
token="@eclipseplatformfilelinux@"
property="eclipseplatform.file.linux-gtk-x86"/>
<replacefilter
token="@eclipseplatformfilewindows@"
property="eclipseplatform.file.win32-win32-x86"/>
<replacefilter
token="@eclipseplatformfilemacos@"
property="eclipseplatform.file.macosx-carbon-ppc"/>
<replacefilter
token="@eclipseplatformBuildHome@"
property="eclipseplatform.build.home"/>
<replacefilter
token="@eclipseplatform.mirror.prefixuri@"
property="eclipseplatform.mirror.prefixuri"/>
<replacefilter
token="@eclipseplatform.fspath.prefix@"
property="eclipse.fspath.prefix"/>
<replacefilter
token="@eclipseFile@"
property="eclipse.file.linux-gtk-x86"/>
<replacefilter
token="@eclipseURL@"
property="eclipse.url/eclipse.file.linux-gtk-x86"/>
<replacefilter
token="@eclipseBuildURL@"
property="eclipse.url"/>
<replacefilter
token="@eclipsefilelinux@"
property="eclipse.file.linux-gtk-x86"/>
<replacefilter
token="@eclipsefilewindows@"
property="eclipse.file.win32-win32-x86"/>
<replacefilter
token="@eclipsefilemacos@"
property="eclipse.file.macosx-carbon-ppc"/>
<replacefilter
token="@eclipseBuildHome@"
property="eclipse.build.home"/>
<replacefilter
token="@eclipse.mirror.prefixuri@"
property="eclipse.mirror.prefixuri"/>
<replacefilter
token="@eclipse.fspath.prefix@"
property="eclipse.fspath.prefix"/>
<replacefilter
token="@testURL@"
property="eclipseTestFramework.url/eclipseTestFramework.file"/>
<replacefilter
token="@testFile@"
property="eclipseTestFramework.file"/>
<replacefilter
token="@4xName@"
property="e4x.name"/>
<replacefilter
token="@4xDescription@"
property="e4x.description"/>
<replacefilter
token="@4xFile@"
property="e4x.file.linux-gtk-x86"/>
<replacefilter
token="@4xURL@"
property="e4x.url/eclipse.file.linux-gtk-x86"/>
<replacefilter
token="@4xBuildURL@"
property="e4x.url"/>
<replacefilter
token="@4xfilelinux@"
property="e4x.file.linux-gtk-x86"/>
<replacefilter
token="@4xfilewindows@"
property="e4x.file.win32-win32-x86"/>
<replacefilter
token="@4xfilemacos@"
property="e4x.file.macosx-carbon-ppc"/>
<replacefilter
token="@4xBuildHome@"
property="e4x.build.home"/>
<replacefilter
token="@4x.mirror.prefixuri@"
property="e4x.mirror.prefixuri"/>
<replacefilter
token="@4x.fspath.prefix@"
property="e4x.fspath.prefix"/>
<replacefilter
token="@emfName@"
property="emf.name"/>
<replacefilter
token="@emfDescription@"
property="emf.description"/>
<replacefilter
token="@emfFile@"
property="emf.file"/>
<replacefilter
token="@emfURL@"
property="emf.url/emf.file"/>
<replacefilter
token="@emfBuildHome@"
property="emf.build.home"/>
<replacefilter
token="@emf.mirror.prefixuri@"
property="emf.mirror.prefixuri"/>
<replacefilter
token="@emfsourceURL@"
property="emfsourcedoc.url/emfsourcedoc.file"/>
<replacefilter
token="@emfsourceFile@"
property="emfsourcedoc.file"/>
<replacefilter
token="@emfsourceName@"
property="emfsourcedoc.name"/>
<replacefilter
token="@emfsourceDescription@"
property="emfsourcedoc.description"/>
<replacefilter
token="@emfsourceBuildHome@"
property="emfsourcedoc.build.home"/>
<replacefilter
token="@emfsource.mirror.prefixuri@"
property="emfsourcedoc.mirror.prefixuri"/>
<replacefilter
token="@emfxsdsourceURL@"
property="emfxsdsourcedoc.url/emfxsdsourcedoc.file"/>
<replacefilter
token="@emfxsdsourceFile@"
property="emfxsdsourcedoc.file"/>
<replacefilter
token="@emfxsdsourceName@"
property="emfxsdsourcedoc.name"/>
<replacefilter
token="@emfxsdsourceDescription@"
property="emfxsdsourcedoc.description"/>
<replacefilter
token="@emfxsdsourceBuildHome@"
property="emfxsdsourcedoc.build.home"/>
<replacefilter
token="@emfxsdsource.mirror.prefixuri@"
property="emfxsdsourcedoc.mirror.prefixuri"/>
<replacefilter
token="@emfxsdFile@"
property="emfxsd.file"/>
<replacefilter
token="@emfxsdName@"
property="emfxsd.name"/>
<replacefilter
token="@emfxsdDescription@"
property="emfxsd.description"/>
<replacefilter
token="@emfxsdURL@"
property="emfxsd.url/emfxsd.file"/>
<replacefilter
token="@emfxsdBuildHome@"
property="emfxsd.build.home"/>
<replacefilter
token="@emfxsd.mirror.prefixuri@"
property="emfxsd.mirror.prefixuri"/>
<replacefilter
token="@emfandxsdsourceURL@"
property="emfandxsdsourcedoc.url/emfandxsdsourcedoc.file"/>
<replacefilter
token="@emfandxsdsourceFile@"
property="emfandxsdsourcedoc.file"/>
<replacefilter
token="@emfandxsdsourceName@"
property="emfandxsdsourcedoc.name"/>
<replacefilter
token="@emfandxsdsourceDescription@"
property="emfandxsdsourcedoc.description"/>
<replacefilter
token="@emfandxsdsourceBuildHome@"
property="emfandxsdsourcedoc.build.home"/>
<replacefilter
token="@emfandxsdsource.mirror.prefixuri@"
property="emfandxsdsourcedoc.mirror.prefixuri"/>
<replacefilter
token="@emfandxsdFile@"
property="emfandxsd.file"/>
<replacefilter
token="@emfandxsdRepo@"
property="emfandxsd.repo"/>
<replacefilter
token="@emfandxsdName@"
property="emfandxsd.name"/>
<replacefilter
token="@emfandxsdDescription@"
property="emfandxsd.description"/>
<replacefilter
token="@emfandxsdURL@"
property="emfandxsd.url/emfandxsd.file"/>
<replacefilter
token="@emfandxsdBuildHome@"
property="emfandxsd.build.home"/>
<replacefilter
token="@emfandxsd.mirror.prefixuri@"
property="emfandxsd.mirror.prefixuri"/>
<replacefilter
token="@emftransactionFile@"
property="emftransaction.file"/>
<replacefilter
token="@emftransactionURL@"
property="emftransaction.url/emftransaction.file"/>
<replacefilter
token="@emftransactionBuildHome@"
property="emftransaction.build.home"/>
<replacefilter
token="@emftransaction.mirror.prefixuri@"
property="emftransaction.mirror.prefixuri"/>
<replacefilter
token="@emftransactionName@"
property="emftransaction.name"/>
<replacefilter
token="@emftransactionDescription@"
property="emftransaction.description"/>
<replacefilter
token="@emfvalidationFile@"
property="emfvalidation.file"/>
<replacefilter
token="@emfvalidationURL@"
property="emfvalidation.url/emfvalidation.file"/>
<replacefilter
token="@emfvalidationBuildHome@"
property="emfvalidation.build.home"/>
<replacefilter
token="@emfvalidation.mirror.prefixuri@"
property="emfvalidation.mirror.prefixuri"/>
<replacefilter
token="@emfvalidationName@"
property="emfvalidation.name"/>
<replacefilter
token="@emfvalidationDescription@"
property="emfvalidation.description"/>
<replacefilter
token="@emfvalidationsourceFile@"
property="emfvalidationsourcedoc.file"/>
<replacefilter
token="@emfvalidationsourceURL@"
property="emfvalidationsourcedoc.url/emfvalidationsourcedoc.file"/>
<replacefilter
token="@emfvalidationsourceBuildHome@"
property="emfvalidationsourcedoc.build.home"/>
<replacefilter
token="@emfvalidationsource.mirror.prefixuri@"
property="emfvalidationsourcedoc.mirror.prefixuri"/>
<replacefilter
token="@emfvalidationsourceName@"
property="emfvalidationsourcedoc.name"/>
<replacefilter
token="@emfvalidationsourceDescription@"
property="emfvalidationsourcedoc.description"/>
<replacefilter
token="@graphitiFile@"
property="graphiti.file"/>
<replacefilter
token="@graphitiURL@"
property="graphiti.url/graphiti.file"/>
<replacefilter
token="@graphitiBuildHome@"
property="graphiti.build.home"/>
<replacefilter
token="@graphiti.mirror.prefixuri@"
property="graphiti.mirror.prefixuri"/>
<replacefilter
token="@graphitiName@"
property="graphiti.name"/>
<replacefilter
token="@graphitiDescription@"
property="graphiti.description"/>
<replacefilter
token="@wstName@"
property="wst.name"/>
<replacefilter
token="@wstDescription@"
property="wst.description"/>
<replacefilter
token="@wstFile@"
property="wst.file"/>
<replacefilter
token="@wstURL@"
property="wst.url/wst.file"/>
<replacefilter
token="@wstBuildHome@"
property="wst.build.home"/>
<replacefilter
token="@wst.mirror.prefixuri@"
property="wst.mirror.prefixuri"/>
<replacefilter
token="@jstName@"
property="jst.name"/>
<replacefilter
token="@jstDescription@"
property="jst.description"/>
<replacefilter
token="@jstFile@"
property="jst.file"/>
<replacefilter
token="@jstURL@"
property="jst.url/jst.file"/>
<replacefilter
token="@jstBuildHome@"
property="jst.build.home"/>
<replacefilter
token="@jst.mirror.prefixuri@"
property="jst.mirror.prefixuri"/>
<replacefilter
token="@wtpName@"
property="wtp.name"/>
<replacefilter
token="@wtpDescription@"
property="wtp.description"/>
<replacefilter
token="@wtpFile@"
property="wtp.file"/>
<replacefilter
token="@wtpRepo@"
property="wtp.repo"/>
<replacefilter
token="@wtpURL@"
property="wtp.url/wtp.file"/>
<replacefilter
token="@wtpBuildHome@"
property="wtp.build.home"/>
<replacefilter
token="@wtp.mirror.prefixuri@"
property="wtp.mirror.prefixuri"/>
<replacefilter
token="@wtptestsName@"
property="wtptests.name"/>
<replacefilter
token="@wtptestsDescription@"
property="wtptests.description"/>
<replacefilter
token="@wtptestsFile@"
property="wtptests.file"/>
<replacefilter
token="@wtptestsURL@"
property="wtptests.url/wtptests.file"/>
<replacefilter
token="@wtptestsBuildHome@"
property="wtptests.build.home"/>
<replacefilter
token="@wtptests.mirror.prefixuri@"
property="wtptests.mirror.prefixuri"/>
<replacefilter
token="@gefFile@"
property="gef.file"/>
<replacefilter
token="@gefRepo@"
property="gef.repo"/>
<replacefilter
token="@gefURL@"
property="gef.url/gef.file"/>
<replacefilter
token="@gefBuildHome@"
property="gef.build.home"/>
<replacefilter
token="@gef.mirror.prefixuri@"
property="gef.mirror.prefixuri"/>
<replacefilter
token="@gefName@"
property="gef.name"/>
<replacefilter
token="@gefDescription@"
property="gef.description"/>
<replacefilter
token="@eclipserelengFile@"
property="eclipsereleng.file"/>
<replacefilter
token="@eclipserelengURL@"
property="eclipsereleng.url/eclipsereleng.file"/>
<replacefilter
token="@orbitthirdpartyzipFile@"
property="orbitthirdpartyzip.file"/>
<replacefilter
token="@orbitthirdpartyzipURL@"
property="orbitthirdpartyzip.url/orbitthirdpartyzip.file"/>
<replacefilter
token="@orbitthirdpartyzipBuildHome@"
property="orbitthirdpartyzip.build.home"/>
<replacefilter
token="@orbitthirdpartyzip.mirror.prefixuri@"
property="orbitthirdpartyzip.mirror.prefixuri"/>
<replacefilter
token="@dtpFile@"
property="dtp.file"/>
<replacefilter
token="@dtpRepo@"
property="dtp.repo"/>
<replacefilter
token="@dtpURL@"
property="dtp.url/dtp.file"/>
<replacefilter
token="@dtpBuildHome@"
property="dtp.build.home"/>
<replacefilter
token="@dtp.mirror.prefixuri@"
property="dtp.mirror.prefixuri"/>
<replacefilter
token="@dtpName@"
property="dtp.name"/>
<replacefilter
token="@dtpDescription@"
property="dtp.description"/>
<replacefilter
token="@dltkFile@"
property="dltk.file"/>
<replacefilter
token="@dltkURL@"
property="dltk.url/dltk.file"/>
<replacefilter
token="@dltkBuildHome@"
property="dltk.build.home"/>
<replacefilter
token="@dltk.mirror.prefixuri@"
property="dltk.mirror.prefixuri"/>
<replacefilter
token="@dltkName@"
property="dltk.name"/>
<replacefilter
token="@dltkDescription@"
property="dltk.description"/>
</replace>
</target>
</project>