[jbosstools-commits] JBoss Tools SVN: r30908 - branches/jbosstools-3.2.x/build/aggregate/site.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Thu Apr 28 11:43:15 EDT 2011
Author: nickboldt
Date: 2011-04-28 11:43:15 -0400 (Thu, 28 Apr 2011)
New Revision: 30908
Modified:
branches/jbosstools-3.2.x/build/aggregate/site/build.xml
Log:
aggregate site builder should pull from local /home/hudson/static_build_env/jbds/builds/staging cache if available, and be able to resolve '../../' as correct URL or path
Modified: branches/jbosstools-3.2.x/build/aggregate/site/build.xml
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-04-28 15:42:47 UTC (rev 30907)
+++ branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-04-28 15:43:15 UTC (rev 30908)
@@ -59,27 +59,68 @@
<!-- fetch zip.list.txt file, if available -->
<var unset="true" name="ALL_ZIPS" />
<var unset="true" name="wget.return" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber --tries=3" />
- </exec>
+ <if>
+ <contains string="${location.cleaned}" substring="http" />
+ <then>
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber --tries=3" />
+ </exec>
+ </then>
+ <else>
+ <copy todir="${aggregate.zips.dir}" failonerror="false">
+ <fileset dir="${location.cleaned}/logs" includes="zip.list.txt" />
+ </copy>
+ </else>
+ </if>
+
<echo level="verbose">Fetch SVN_REVISION.txt if it exists (return 8 if not found)</echo>
<var name="svnRevTXT" value="${aggregate.zips.dir}/SVN_REVISION.txt" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/SVN_REVISION.txt -q --no-clobber --tries=3" />
- </exec>
+ <if>
+ <contains string="${location.cleaned}" substring="http" />
+ <then>
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/logs/SVN_REVISION.txt -q --no-clobber --tries=3" />
+ </exec>
+ </then>
+ <else>
+ <copy todir="${aggregate.zips.dir}" failonerror="false">
+ <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.txt" />
+ </copy>
+ </else>
+ </if>
<echo level="verbose">Fetch SVN_REVISION.xml if it exists (return 8 if not found)</echo>
<var name="svnRevXML" value="${aggregate.zips.dir}/SVN_REVISION.xml" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/SVN_REVISION.xml -q --no-clobber --tries=3" />
- </exec>
+ <if>
+ <contains string="${location.cleaned}" substring="http" />
+ <then>
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/logs/SVN_REVISION.xml -q --no-clobber --tries=3" />
+ </exec>
+ </then>
+ <else>
+ <copy todir="${aggregate.zips.dir}" failonerror="false">
+ <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.xml" />
+ </copy>
+ </else>
+ </if>
<echo level="verbose">Fetch build.properties if it exists (return 8 if not found)</echo>
<var name="buildProperties" value="${aggregate.zips.dir}/build.properties" />
- <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/logs/build.properties -q --no-clobber --tries=3" />
- </exec>
+ <if>
+ <contains string="${location.cleaned}" substring="http" />
+ <then>
+ <exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/logs/build.properties -q --no-clobber --tries=3" />
+ </exec>
+ </then>
+ <else>
+ <copy todir="${aggregate.zips.dir}" failonerror="false">
+ <fileset dir="${location.cleaned}/logs" includes="build.properties" />
+ </copy>
+ </else>
+ </if>
<if>
<and>
@@ -229,8 +270,17 @@
<!-- foreach entry repository.children.child.location -->
<for param="location" list="${repository.children.child.location}">
<sequential>
- <echo level="error">Site URL = @{location}</echo>
- <fetchZipsFromList repo="@{location}" />
+ <if>
+ <available file="/home/hudson/static_build_env/jbds/builds/staging" type="dir" />
+ <then>
+ <propertyregex override="true" property="location.cleaned" defaultvalue="@{location}" input="@{location}" regexp="../../" replace="/home/hudson/static_build_env/jbds/builds/staging/" />
+ </then>
+ <else>
+ <propertyregex override="true" property="location.cleaned" defaultvalue="@{location}" input="@{location}" regexp="../../" replace="http://download.jboss.org/jbosstools/builds/staging/" />
+ </else>
+ </if>
+ <echo level="error">Site URL = ${location.cleaned} (@{location})</echo>
+ <fetchZipsFromList repo="${location.cleaned}" />
</sequential>
</for>
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml" quiet="true" />
More information about the jbosstools-commits
mailing list