Author: nickboldt
Date: 2011-05-29 01:29:19 -0400 (Sun, 29 May 2011)
New Revision: 31603
Modified:
trunk/build/results/build.xml
trunk/build/results/buildResults.xsl
Log:
https://issues.jboss.org/browse/JBIDE-7444
Modified: trunk/build/results/build.xml
===================================================================
--- trunk/build/results/build.xml 2011-05-29 05:12:14 UTC (rev 31602)
+++ trunk/build/results/build.xml 2011-05-29 05:29:19 UTC (rev 31603)
@@ -1,4 +1,4 @@
-<project default="build.results">
+<project default="buildResults.aggregate">
<!-- should be set by script or in Hudson -->
<property name="ZIPSUFFIX" value="SNAPSHOT" />
@@ -6,9 +6,6 @@
<!-- should be set by Hudson -->
<!-- <property name="JOB_NAME"
value="jbosstools-3.2.0.M2.continuous" /> -->
- <!-- if a different template file (eg., a partially expanded one) should be used,
feed it in here -->
- <property name="template.file" value="download-template.xml"
/>
-
<!-- if ${WORKSPACE}/site folder exists, target that folder; else generate here.
-->
<condition property="output.dir" value="${WORKSPACE}/results"
else="${basedir}">
<available file="${WORKSPACE}/results" />
@@ -102,146 +99,23 @@
</macrodef>
</target>
- <target name="build.results" depends="init">
- <!--
- 1. resolve variables in download-template.xml to produce download.xml
- 2. XSL transform download.xml to produce download-snippet.html
- 3. manually copy the contents of this file into a page under
-
http://www.jboss.org/tools/downloads/
- -->
- <echo level="info">ZIPSUFFIX = ${ZIPSUFFIX}
-WORKINGDIR = ${WORKINGDIR}
-COMMON_TOOLS = ${COMMON_TOOLS}
-input.dir = ${input.dir}
-output.dir = ${output.dir}</echo>
- <for param="UPDATEZIP">
- <path>
- <fileset dir="${input.dir}">
- <include name="**/*-Update-${ZIPSUFFIX}.zip" />
- <include name="**/*-Sources-${ZIPSUFFIX}.zip" />
- </fileset>
- </path>
- <sequential>
- <var name="filename" unset="true" />
- <propertyregex property="filename" input="@{UPDATEZIP}"
defaultvalue="@{UPDATEZIP}" regexp=".+/([^/]+\.zip)"
replace="\1" casesensitive="false" override="true" />
- <propertyregex property="COMPONENT" input="${filename}"
defaultvalue="${filename}"
regexp="(.+)-(Update|Sources)-${ZIPSUFFIX}\.zip" replace="\1"
casesensitive="false" override="true" />
- <if>
- <and>
- <isset property="JOB_NAME" />
- <equals arg1="${COMPONENT}" arg2="${JOB_NAME}" />
- </and>
- <then>
- <if>
- <!-- only set the update variable if it's NOT coming from the aggregate
build -->
- <and>
- <equals arg1="${filename}"
arg2="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip" />
- <not>
- <contains string="${JOB_NAME}" substring="aggregate"
/>
- </not>
- </and>
- <then>
- <var name="COMPONENT" unset="true" />
- <var name="COMPONENT" value="sources" />
- </then>
- <elseif>
- <!-- only set the update variable if it's coming from the aggregate build;
others should be ignored -->
- <and>
- <equals arg1="${filename}"
arg2="${JOB_NAME}-Update-${ZIPSUFFIX}.zip" />
- <contains string="${JOB_NAME}" substring="aggregate"
/>
- </and>
- <then>
- <var name="COMPONENT" unset="true" />
- <var name="COMPONENT" value="update" />
- </then>
- </elseif>
- </if>
- </then>
- </if>
+ <!-- NEW STUFF HERE -->
- <echo level="verbose">UPDATEZIP = @{UPDATEZIP}
-COMPONENT = ${COMPONENT}</echo>
- <property name="${COMPONENT}-filename" value="${filename}"
/>
-
- <get.size file="@{UPDATEZIP}" property="${COMPONENT}-filesize"
/>
- <var name="filesize" unset="true" />
- <propertycopy from="${COMPONENT}-filesize" property="filesize"
override="true" silent="true" />
- <echo level="info">filesize = ${filesize}</echo>
- <echo level="info">filename = ${filename}</echo>
- <var name="filesize" unset="true" />
- <var name="filename" unset="true" />
- </sequential>
- </for>
-
- <if>
- <!-- default operation from template file -->
- <equals arg1="${template.file}" arg2="download-template.xml"
/>
- <then>
- <copy todir="${output.dir}" overwrite="true">
- <fileset dir="${output.dir}" file="${template.file}" />
- <mapper type="merge" to="download.xml" />
- <filterchain>
- <expandproperties />
- </filterchain>
- </copy>
- <xslt in="${output.dir}/download.xml"
out="${output.dir}/download-snippet.html" style="download.xsl" />
- <xslt in="${output.dir}/download.xml"
out="${output.dir}/buildResults.html" style="buildResults.xsl" />
- <copy todir="${output.dir}" file="buildResults.css" />
- <delete file="${output.dir}/download.xml" />
- </then>
- <elseif>
- <!-- use previously XLST'd file from an upstream build -->
- <or>
- <contains string="${template.file}" substring="http:" />
- <contains string="${template.file}" substring="https:" />
- <contains string="${template.file}" substring="ftp:" />
- </or>
- <then>
- <propertyregex property="template.file.cleaned"
input="${template.file}" defaultvalue="${template.file}"
regexp=".+/([^/]+)" replace="\1" override="true" />
- <get src="${template.file}"
dest="${output.dir}/${template.file.cleaned}.in" ignoreerrors="true"
/>
- <if>
- <available file="${output.dir}/${template.file.cleaned}.in"
type="file" />
- <then>
- <!-- use pre-existing snippet file -->
- <copy todir="${output.dir}" overwrite="true">
- <fileset dir="${output.dir}"
file="${template.file.cleaned}.in" />
- <mapper type="merge" to="download-snippet.html" />
- <filterchain>
- <expandproperties />
- </filterchain>
- </copy>
- <delete file="${output.dir}/${template.file.cleaned}.in"
quiet="true" />
- </then>
- <else>
- <!-- fall back to default template file -->
- <var name="template.file" value="download-template.xml"
/>
- <copy todir="${output.dir}" overwrite="true">
- <fileset dir="${output.dir}" file="${template.file}"
/>
- <mapper type="merge" to="download.xml" />
- <filterchain>
- <expandproperties />
- </filterchain>
- </copy>
- <xslt in="${output.dir}/download.xml"
out="${output.dir}/download-snippet.html" style="download.xsl" />
- <delete file="${output.dir}/download.xml" />
- </else>
- </if>
- </then>
- </elseif>
- </if>
+ <target name="buildResults.aggregate" depends="init"
description="generate buildResults.html from build properties">
+ <ant target="collect.zips"
antfile="../aggregate/site/build.xml">
+ <property name="inputRepos" value="1" />
+ <property name="inputRepo1"
value="http://download.jboss.org/jbosstools/builds/staging/_composit...
/>
+ </ant>
+ <ant target="collect.metadata"
antfile="../aggregate/site/build.xml">
+ </ant>
+ <antcall target="buildResults" />
</target>
- <target name="test.xslt">
- <xslt in="download-template.xml" out="download-snippet.out.html"
style="download.xsl" />
- <xslt in="download-template.xml" out="buildResults.out.html"
style="buildResults.xsl" />
- </target>
-
- <!-- NEW STUFF HERE -->
-
<target name="test.buildResults.aggregate" depends="init"
description="generate buildResults.html from build properties">
<property name="isTest" value="true" />
<ant target="collect.zips"
antfile="../aggregate/site/build.xml">
<property name="inputRepos" value="1" />
- <property name="inputRepo1"
value="http://download.jboss.org/jbosstools/builds/staging/_composit...
/>
+ <property name="inputRepo1"
value="http://download.jboss.org/jbosstools/builds/staging/_composit...
/>
</ant>
<ant target="collect.metadata"
antfile="../aggregate/site/build.xml">
</ant>
@@ -252,7 +126,7 @@
<property name="isTest" value="true" />
<ant target="collect.zips"
antfile="../aggregate/site/build.xml">
<property name="inputRepos" value="1" />
- <property name="inputRepo1"
value="http://download.jboss.org/jbosstools/builds/staging/jbosstool...
/>
+ <property name="inputRepo1"
value="http://download.jboss.org/jbosstools/builds/staging/jbosstool...
/>
</ant>
<ant target="collect.metadata"
antfile="../aggregate/site/build.xml">
</ant>
@@ -260,7 +134,6 @@
</target>
<target name="buildResults" description="generate buildResults.html
from build properties" depends="init">
-
<delete quiet="true" file="buildResults.out.html" />
<xslt in="zips/build.properties.all.xml"
out="buildResults.out.html" style="buildResults.xsl"
force="true">
<classpath location="${COMMON_TOOLS}/saxon.jar" />
Modified: trunk/build/results/buildResults.xsl
===================================================================
--- trunk/build/results/buildResults.xsl 2011-05-29 05:12:14 UTC (rev 31602)
+++ trunk/build/results/buildResults.xsl 2011-05-29 05:29:19 UTC (rev 31603)
@@ -81,8 +81,8 @@
</xsl:variable>
<xsl:variable name="COMPONENT">
<xsl:choose>
- <!-- property name="jbosstools-3.2_trunk.component-
-ws-SNAPSHOT.build.properties.JOB_NAME"
- value="jbosstools-3.2_trunk.component- -ws" -->
+ <!-- property name="jbosstools-3.3_trunk.component-
-ws-SNAPSHOT.build.properties.JOB_NAME"
+ value="jbosstools-3.3_trunk.component- -ws" -->
<xsl:when test="contains(@value,'component--')">
<xsl:value-of
select="substring-after(@value,'component--')" />
</xsl:when>
@@ -138,8 +138,8 @@
<b>
<xsl:variable name="filelabel">
<xsl:choose>
- <!-- property name="jbosstools-3.2_trunk.component-
-ws-SNAPSHOT.build.properties.JOB_NAME"
- value="jbosstools-3.2_trunk.component- -ws" -->
+ <!-- property name="jbosstools-3.3_trunk.component-
-ws-SNAPSHOT.build.properties.JOB_NAME"
+ value="jbosstools-3.3_trunk.component- -ws" -->
<xsl:when test="contains(@value,'component--')">
<xsl:value-of
select="substring-after(@value,'component--')" />
</xsl:when>
@@ -162,6 +162,23 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
+ <!-- Update, Sources, etc. -->
+ <xsl:variable name="fileType">
+ <xsl:choose>
+ <xsl:when test="contains($filelabel, 'Update')">
+ <xsl:value-of
+ select="'Update'" />
+ </xsl:when>
+ <xsl:when test="contains($filelabel, 'Sources')">
+ <xsl:value-of
+ select="'Sources'" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'Other'" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<a class="allLink-blue" href="{@value}">
<xsl:value-of select="$filelabel" />
</a>
@@ -169,12 +186,12 @@
<li>
md5:
<xsl:for-each
- select="//property[contains((a)name,'build.properties.filemd5')
and contains(@name,$COMPONENT)]">
+ select="//property[contains((a)name,'build.properties.filemd5')
and contains(@name,$COMPONENT) and contains(@name,$fileType)]">
<xsl:value-of select="@value" />
</xsl:for-each>
</li><li>size:
<xsl:for-each
- select="//property[contains((a)name,'build.properties.filesize')
and contains(@name,$COMPONENT)]">
+ select="//property[contains((a)name,'build.properties.filesize')
and contains(@name,$COMPONENT) and contains(@name,$fileType)]">
<xsl:value-of select="@value" /> bytes
</xsl:for-each>
</li>
@@ -200,28 +217,28 @@
<br />
See
<a
-
href="http://download.jboss.org/jbosstools/builds/staging/jbosstools...
+
href="http://download.jboss.org/jbosstools/builds/staging/jbosstools...
</div>
<div id="buildDrivers-blue">
<b>Target Platform</b>
<table>
<tr>
<td rowspan="3">
- Eclipse Helios 3.6.1 +
+ Eclipse Helios 3.7 +
<br />
- Web Tools 3.2.2 +
+ Web Tools 3.3 +
<br />
- TPTP + BIRT + DTP ...
+ BIRT + DTP ...
</td>
<td>
<a class="blue"
-
href="http://download.jboss.org/jbosstools/updates/target-platform/l...
Platform Update Site</a>
+
href="http://download.jboss.org/jbosstools/updates/target-platform_3...
Platform Update Site</a>
</td>
</tr>
<tr>
<td>
<a class="blue"
-
href="http://download.jboss.org/jbosstools/updates/target-platform/e...
Platform Update Zip</a>
+
href="http://download.jboss.org/jbosstools/updates/target-platform_3...
Platform Update Zip</a>
</td>
</tr>
<tr>
@@ -238,7 +255,7 @@
See
<a
-
href="http://hudson.qa.jboss.com/hudson/view/DevStudio_Stable_Branch...
+
href="http://hudson.qa.jboss.com/hudson/view/DevStudio_Trunk/job/jbo...
<!-- <table> <tr> <td> <img
src="images/test.gif" /> Tests </td> <td
align="right">??? </td> </tr> <tr> <td>
<img src="images/testerr.gif" />
Errors </td> <td align="right">???</td> </tr>
<tr> <td> <img src="images/testfail.gif"