JBoss Tools SVN: r25431 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-02 02:43:56 -0400 (Sat, 02 Oct 2010)
New Revision: 25431
Modified:
trunk/build/target-platform/publish.sh
Log:
publish script for generated target platform repo (built by Hudson) echo sizes into log and move temp file
Modified: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh 2010-10-02 06:35:39 UTC (rev 25430)
+++ trunk/build/target-platform/publish.sh 2010-10-02 06:43:56 UTC (rev 25431)
@@ -1,22 +1,26 @@
#!/bin/bash
-# Hudson creates a repo in ${repoPath}
-# So, copy it into other places for access by downstream jobs and others
+# Hudson creates a repo in ${repoPath}; copy it into other places for access by downstream jobs and users
+targetFile=e361-wtp322.target
+
repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
-targetFile=e361-wtp322.target
+destinationPath=/home/hudson/static_build_env/jbds/target-platform
DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
-LOCALDESTNN=/home/hudson/static_build_env/jbds/target-platform
if [[ -d ${repoPath} ]]; then
+ du -sh ${repoPath}
+
# copy/update into central place for reuse by local downstream build jobs
- rsync -aPrz --delete ${repoPath}/* ${LOCALDESTNN}/${targetFile}/
+ rsync -aPrz --delete ${repoPath}/* ${destinationPath}/${targetFile}/
+ du -sh ${destinationPath}/${targetFile}
# upload to http://download.jboss.org/jbossotools/updates/target-platform/latest/ for public use
rsync -aPrz --delete --rsh=ssh ${repoPath}/* ${DESTINATION}/latest/ &
# create zip, then upload to http://download.jboss.org/jbossotools/updates/target-platform/${targetFil... for public use
cd ${repoPath} && \
- zip -q -r9 ../${targetFile}.zip * && \
- rsync -aPrz --delete --rsh=ssh ${repoPath}/../${targetFile}.zip ${DESTINATION}/ && \
- rm -f ${repoPath}/../${targetFile}.zip
+ zip -q -r9 /tmp/${targetFile}.zip * && \
+ du -sh /tmp/${targetFile}.zip && \
+ rsync -aPrz --delete --rsh=ssh /tmp/${targetFile}.zip ${DESTINATION}/ && \
+ rm -f /tmp/${targetFile}.zip
fi
14 years, 3 months
JBoss Tools SVN: r25430 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-02 02:35:39 -0400 (Sat, 02 Oct 2010)
New Revision: 25430
Modified:
trunk/build/target-platform/README.txt
Log:
mention publish script for generated target platform repo (built by Hudson)
Modified: trunk/build/target-platform/README.txt
===================================================================
--- trunk/build/target-platform/README.txt 2010-10-02 06:34:12 UTC (rev 25429)
+++ trunk/build/target-platform/README.txt 2010-10-02 06:35:39 UTC (rev 25430)
@@ -35,19 +35,23 @@
rsync -aPrz --rsh=ssh /home/nboldt/e361-wtp322.target.zip \
tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform &
+4. Alternatively, see publish.sh for when repo is built in JBoss Hudson.
+
== HOWTO: Publish local p2 repo (generated from .target) to shared location in Hudson for use in builds ==
1. You can reference http://download.jboss.org/jbosstools/updates/target-platform/latest/,
but a local path reference is faster.
2. So, continuing from previous HOWTO, copy from /tmp/e361-wtp322.target into
- file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
+ file://home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/
rsync -aPrz --delete /tmp/e361-wtp322.target/* \
- /home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/ &
+ /home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/ &
+3. Alternatively, see publish.sh for when repo is built in JBoss Hudson.
+
== HOWTO: Update an existing .target file from newer versions of IUs in a repo ==
1. Run targetUpdateFromRepo.xml against a given repo folder on disk, eg.
14 years, 3 months
JBoss Tools SVN: r25429 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-02 02:34:12 -0400 (Sat, 02 Oct 2010)
New Revision: 25429
Added:
trunk/build/target-platform/publish.sh
Log:
publish script for generated target platform repo (built by Hudson)
Added: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh (rev 0)
+++ trunk/build/target-platform/publish.sh 2010-10-02 06:34:12 UTC (rev 25429)
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Hudson creates a repo in ${repoPath}
+# So, copy it into other places for access by downstream jobs and others
+
+repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
+targetFile=e361-wtp322.target
+DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+LOCALDESTNN=/home/hudson/static_build_env/jbds/target-platform
+
+if [[ -d ${repoPath} ]]; then
+ # copy/update into central place for reuse by local downstream build jobs
+ rsync -aPrz --delete ${repoPath}/* ${LOCALDESTNN}/${targetFile}/
+
+ # upload to http://download.jboss.org/jbossotools/updates/target-platform/latest/ for public use
+ rsync -aPrz --delete --rsh=ssh ${repoPath}/* ${DESTINATION}/latest/ &
+
+ # create zip, then upload to http://download.jboss.org/jbossotools/updates/target-platform/${targetFil... for public use
+ cd ${repoPath} && \
+ zip -q -r9 ../${targetFile}.zip * && \
+ rsync -aPrz --delete --rsh=ssh ${repoPath}/../${targetFile}.zip ${DESTINATION}/ && \
+ rm -f ${repoPath}/../${targetFile}.zip
+fi
14 years, 3 months
JBoss Tools SVN: r25428 - in branches/jbosstools-3.2.0.Beta1/build: target-platform and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 22:37:42 -0400 (Fri, 01 Oct 2010)
New Revision: 25428
Added:
branches/jbosstools-3.2.0.Beta1/build/target-platform/build.xml
branches/jbosstools-3.2.0.Beta1/build/target-platform/getArch.sh
Modified:
branches/jbosstools-3.2.0.Beta1/build/parent/pom.xml
branches/jbosstools-3.2.0.Beta1/build/target-platform/README.txt
Log:
update docs (backport from trunk); add new build.xml and getArch.sh for building target platform repo w/ ant
Modified: branches/jbosstools-3.2.0.Beta1/build/parent/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta1/build/parent/pom.xml 2010-10-02 02:33:46 UTC (rev 25427)
+++ branches/jbosstools-3.2.0.Beta1/build/parent/pom.xml 2010-10-02 02:37:42 UTC (rev 25428)
@@ -183,6 +183,7 @@
<repositories>
<repository>
<id>helios</id>
+ <!-- could also use http://download.jboss.org/jbosstools/updates/target-platform/latest/ -->
<url>file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/</url>
<layout>p2</layout>
<snapshots>
Modified: branches/jbosstools-3.2.0.Beta1/build/target-platform/README.txt
===================================================================
--- branches/jbosstools-3.2.0.Beta1/build/target-platform/README.txt 2010-10-02 02:33:46 UTC (rev 25427)
+++ branches/jbosstools-3.2.0.Beta1/build/target-platform/README.txt 2010-10-02 02:37:42 UTC (rev 25428)
@@ -20,27 +20,39 @@
1. Zip the repo
- cd /tmp/REPO; zip -9r e361-wtp322.target.zip *
+ cd /tmp/REPO; zip -9r e361-wtp322.target.zip * &
2. Push to qa01
- rsync e361-wtp322.target.zip nboldt@qa01:~/
+ rsync -aPrz e361-wtp322.target.zip nboldt@qa01:~/ &
3. Ssh to qa01; sudo to hudson; unpack and push contents + zip to download.jboss.org
sudo su - hudson
- unzip /home/nboldt/e361-wtp322.target.zip -d /tmp/e361-wtp322.target
- rsync -aPrz --rsh=ssh /tmp/e361-wtp322.target/* \
- tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform/latest/
+ unzip /home/nboldt/e361-wtp322.target.zip -d /tmp/e361-wtp322.target &
+ rsync -aPrz --delete --rsh=ssh /tmp/e361-wtp322.target/* \
+ tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform/latest/ &
rsync -aPrz --rsh=ssh /home/nboldt/e361-wtp322.target.zip \
- tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+ tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform &
+== HOWTO: Publish local p2 repo (generated from .target) to shared location in Hudson for use in builds ==
+
+1. You can reference http://download.jboss.org/jbosstools/updates/target-platform/latest/,
+ but a local path reference is faster.
+
+2. So, continuing from previous HOWTO, copy from /tmp/e361-wtp322.target into
+ file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
+
+ rsync -aPrz --delete /tmp/e361-wtp322.target/* \
+ /home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/ &
+
+
== HOWTO: Update an existing .target file from newer versions of IUs in a repo ==
1. Run targetUpdateFromRepo.xml against a given repo folder on disk, eg.
-ant -v -f targetUpdateFromRepo.xml -DtargetFile=e361-wtp322.target -DrepoDir=./REPO_SR1
+ ant -v -f targetUpdateFromRepo.xml -DtargetFile=e361-wtp322.target -DrepoDir=./REPO_SR1
2. Resulting targetFile will be overwritten with updated version values from what was found in the
repo's content.xml file.
Added: branches/jbosstools-3.2.0.Beta1/build/target-platform/build.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta1/build/target-platform/build.xml (rev 0)
+++ branches/jbosstools-3.2.0.Beta1/build/target-platform/build.xml 2010-10-02 02:37:42 UTC (rev 25428)
@@ -0,0 +1,109 @@
+<project default="custom.hudson.build" name="jbosstools target platform p2.mirror generator - ant script for Hudson">
+ <property name="targetFile" value="e361-wtp322.target" />
+
+ <!-- if useLatest = true, omit versions from p2.mirror script to fetch latest version available;
+ if useLatest = false, include versions and fetch specific versions requested. -->
+ <property name="useLatest" value="true" />
+
+ <property name="tmpdir" value="${java.io.tmpdir}/target-platform-build" />
+
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <mkdir dir="${WORKINGDIR}" />
+
+ <condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools" else="${java.io.tmpdir}">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <mkdir dir="${COMMON_TOOLS}" />
+
+ <condition property="build.xml" value="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml">
+ <available file="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build/build.xml">
+ <available file="${basedir}/../../build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build.xml">
+ <available file="${basedir}/../../build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../sources/build.xml">
+ <available file="${basedir}/../../sources/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../build.xml">
+ <available file="${basedir}/../build.xml" type="file" />
+ </condition>
+ <!-- if can't calculate where build/build.xml is located, must pass in path from parent when calling this script -->
+
+ <target name="custom.hudson.build" depends="init, get.arch, get.eclipse, gen.p2mirror.script, run.p2mirror.script, cleanup" />
+
+ <target name="init">
+ <ant antfile="${build.xml}" target="init" />
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target>
+
+ <target name="get.arch">
+ <if>
+ <os family="unix" />
+ <then>
+ <!-- Ant thinks that ${os.arch} == i386 for ${arch}, so use `uname` instead -->
+ <exec executable="bash" outputproperty="arch">
+ <arg line="getArch.sh" />
+ </exec>
+ </then>
+ <else>
+ <echo level="error">This script is only tested to work on Linux 32- and 64-bit Hudson slaves.</echo>
+ <condition property="arch" value="${arch}" else="">
+ <os arch="amd64" />
+ </condition>
+ </else>
+ </if>
+ </target>
+
+ <!-- only meant to work with linux 32- and 64-bit slaves -->
+ <target name="get.eclipse">
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
+ <property name="eclipse.version" value="eclipse-SDK-3.6.1" />
+ <if>
+ <equals arg1="${arch}" arg2="x86" />
+ <then>
+ <property name="eclipse.file" value="${eclipse.version}-linux-gtk.tar.gz" />
+ </then>
+ <else>
+ <property name="eclipse.file" value="${eclipse.version}-linux-gtk-${arch}.tar.gz" />
+ </else>
+ </if>
+
+ <if>
+ <not>
+ <available file="${WORKINGDIR}/${eclipse.file}" type="file" />
+ </not>
+ <then>
+ <get src="${eclipse.URL}/${eclipse.file}" dest="${WORKINGDIR}/${eclipse.file}" />
+ </then>
+ </if>
+ <untar compression="gzip" dest="${WORKINGDIR}" src="${WORKINGDIR}/${eclipse.file}" overwrite="true" />
+ <chmod perm="+x" file="${WORKINGDIR}/eclipse/eclipse" />
+ </target>
+
+ <target name="gen.p2mirror.script" description="use XSLT to generate a p2.mirror script from .target">
+ <ant antfile="target2p2mirror.xml" />
+ </target>
+
+ <!-- /abs/path/to/eclipse -vm /opt/jdk1.6.0/bin/java -nosplash -data /tmp/workspace -consolelog -application
+ org.eclipse.ant.core.antRunner -f *.target.p2mirror.xml -Ddebug=true -DfollowStrict=true -Drepo.dir=/tmp/REPO/ -->
+ <target name="run.p2mirror.script" description="build target update site using p2.mirror">
+ <exec executable="${WORKINGDIR}/eclipse/eclipse" dir="${basedir}">
+ <arg line=" -nosplash -data ${tmpdir}/workspace -consolelog -application org.eclipse.ant.core.antRunner" />
+ <arg line=" -f ${targetFile}.p2mirror.xml -DfollowStrict=true -Drepo.dir=${WORKINGDIR}/REPO/" />
+ <arg line=" -Ddebug=true" />
+ </exec>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${tmpdir}" quiet="true" includeemptydirs="true" />
+ </target>
+</project>
Added: branches/jbosstools-3.2.0.Beta1/build/target-platform/getArch.sh
===================================================================
--- branches/jbosstools-3.2.0.Beta1/build/target-platform/getArch.sh (rev 0)
+++ branches/jbosstools-3.2.0.Beta1/build/target-platform/getArch.sh 2010-10-02 02:37:42 UTC (rev 25428)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if uname -m > /dev/null 2>&1; then
+ arch=`uname -m`
+else
+ arch=`uname -p`
+fi
+# Massage arch for Eclipse-uname differences
+case $arch in
+ i[0-9]*86)
+ arch=x86 ;;
+ ia64)
+ arch=ia64 ;;
+ ppc)
+ arch=ppc ;;
+ ppc64)
+ arch=ppc ;;
+ x86_64)
+ arch=x86_64 ;;
+ *)
+ echo "ERROR: Unrecognized architecture: $arch"
+ exit 1 ;;
+esac
+echo $arch
\ No newline at end of file
Property changes on: branches/jbosstools-3.2.0.Beta1/build/target-platform/getArch.sh
___________________________________________________________________
Name: svn:executable
+ *
14 years, 3 months
JBoss Tools SVN: r25427 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 22:33:46 -0400 (Fri, 01 Oct 2010)
New Revision: 25427
Modified:
trunk/build/parent/pom.xml
Log:
add note about alternate http URL for target platform repo
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2010-10-02 02:14:53 UTC (rev 25426)
+++ trunk/build/parent/pom.xml 2010-10-02 02:33:46 UTC (rev 25427)
@@ -217,6 +217,7 @@
<repositories>
<repository>
<id>helios</id>
+ <!-- could also use http://download.jboss.org/jbosstools/updates/target-platform/latest/ -->
<url>file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/</url>
<layout>p2</layout>
<snapshots>
14 years, 3 months
JBoss Tools SVN: r25426 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 22:14:53 -0400 (Fri, 01 Oct 2010)
New Revision: 25426
Modified:
trunk/build/target-platform/README.txt
Log:
tweak copy
Modified: trunk/build/target-platform/README.txt
===================================================================
--- trunk/build/target-platform/README.txt 2010-10-02 02:12:55 UTC (rev 25425)
+++ trunk/build/target-platform/README.txt 2010-10-02 02:14:53 UTC (rev 25426)
@@ -20,20 +20,20 @@
1. Zip the repo
- cd /tmp/REPO; zip -9r e361-wtp322.target.zip *
+ cd /tmp/REPO; zip -9r e361-wtp322.target.zip * &
2. Push to qa01
- rsync -aPrz e361-wtp322.target.zip nboldt@qa01:~/
+ rsync -aPrz e361-wtp322.target.zip nboldt@qa01:~/ &
3. Ssh to qa01; sudo to hudson; unpack and push contents + zip to download.jboss.org
sudo su - hudson
- unzip /home/nboldt/e361-wtp322.target.zip -d /tmp/e361-wtp322.target
+ unzip /home/nboldt/e361-wtp322.target.zip -d /tmp/e361-wtp322.target &
rsync -aPrz --delete --rsh=ssh /tmp/e361-wtp322.target/* \
- tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform/latest/
+ tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform/latest/ &
rsync -aPrz --rsh=ssh /home/nboldt/e361-wtp322.target.zip \
- tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+ tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform &
== HOWTO: Publish local p2 repo (generated from .target) to shared location in Hudson for use in builds ==
@@ -45,14 +45,14 @@
file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
rsync -aPrz --delete /tmp/e361-wtp322.target/* \
- /home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
+ /home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/ &
== HOWTO: Update an existing .target file from newer versions of IUs in a repo ==
1. Run targetUpdateFromRepo.xml against a given repo folder on disk, eg.
-ant -v -f targetUpdateFromRepo.xml -DtargetFile=e361-wtp322.target -DrepoDir=./REPO_SR1
+ ant -v -f targetUpdateFromRepo.xml -DtargetFile=e361-wtp322.target -DrepoDir=./REPO_SR1
2. Resulting targetFile will be overwritten with updated version values from what was found in the
repo's content.xml file.
14 years, 3 months
JBoss Tools SVN: r25425 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 22:12:55 -0400 (Fri, 01 Oct 2010)
New Revision: 25425
Modified:
trunk/build/target-platform/README.txt
Log:
add section on updating local file:// repo used by builds in Hudson; add --delete flag when updating /latest/
Modified: trunk/build/target-platform/README.txt
===================================================================
--- trunk/build/target-platform/README.txt 2010-10-02 01:38:05 UTC (rev 25424)
+++ trunk/build/target-platform/README.txt 2010-10-02 02:12:55 UTC (rev 25425)
@@ -30,12 +30,24 @@
sudo su - hudson
unzip /home/nboldt/e361-wtp322.target.zip -d /tmp/e361-wtp322.target
- rsync -aPrz --rsh=ssh /tmp/e361-wtp322.target/* \
+ rsync -aPrz --delete --rsh=ssh /tmp/e361-wtp322.target/* \
tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform/latest/
rsync -aPrz --rsh=ssh /home/nboldt/e361-wtp322.target.zip \
tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+== HOWTO: Publish local p2 repo (generated from .target) to shared location in Hudson for use in builds ==
+
+1. You can reference http://download.jboss.org/jbosstools/updates/target-platform/latest/,
+ but a local path reference is faster.
+
+2. So, continuing from previous HOWTO, copy from /tmp/e361-wtp322.target into
+ file://home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
+
+ rsync -aPrz --delete /tmp/e361-wtp322.target/* \
+ /home/hudson/static_build_env/jbds/target-platform/e36-wtp322.target/
+
+
== HOWTO: Update an existing .target file from newer versions of IUs in a repo ==
1. Run targetUpdateFromRepo.xml against a given repo folder on disk, eg.
14 years, 3 months
JBoss Tools SVN: r25424 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 21:38:05 -0400 (Fri, 01 Oct 2010)
New Revision: 25424
Modified:
trunk/build/target-platform/build.xml
Log:
use WORKINGDIR instead of WORKSPACE so REPO and eclipse aren't inside the sources/ dir
Modified: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-10-02 01:35:52 UTC (rev 25423)
+++ trunk/build/target-platform/build.xml 2010-10-02 01:38:05 UTC (rev 25424)
@@ -7,8 +7,10 @@
<property name="tmpdir" value="${java.io.tmpdir}/target-platform-build" />
- <!-- assume this is run from /WORKSPACE/sources/ == /trunk/build/ -->
- <property name="WORKSPACE" value="${basedir}" />
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources" else="${basedir}">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <mkdir dir="${WORKINGDIR}" />
<condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools" else="${java.io.tmpdir}">
<available file="/home/hudson/static_build_env/jbds" type="dir" />
14 years, 3 months
JBoss Tools SVN: r25423 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 21:35:52 -0400 (Fri, 01 Oct 2010)
New Revision: 25423
Modified:
trunk/build/target-platform/build.xml
Log:
use WORKINGDIR instead of WORKSPACE so REPO and eclipse aren't inside the sources/ dir
Modified: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-10-02 01:28:09 UTC (rev 25422)
+++ trunk/build/target-platform/build.xml 2010-10-02 01:35:52 UTC (rev 25423)
@@ -77,14 +77,14 @@
<if>
<not>
- <available file="${WORKSPACE}/${eclipse.file}" type="file" />
+ <available file="${WORKINGDIR}/${eclipse.file}" type="file" />
</not>
<then>
- <get src="${eclipse.URL}/${eclipse.file}" dest="${WORKSPACE}/${eclipse.file}" />
+ <get src="${eclipse.URL}/${eclipse.file}" dest="${WORKINGDIR}/${eclipse.file}" />
</then>
</if>
- <untar compression="gzip" dest="${WORKSPACE}" src="${WORKSPACE}/${eclipse.file}" overwrite="true" />
- <chmod perm="+x" file="${WORKSPACE}/eclipse/eclipse" />
+ <untar compression="gzip" dest="${WORKINGDIR}" src="${WORKINGDIR}/${eclipse.file}" overwrite="true" />
+ <chmod perm="+x" file="${WORKINGDIR}/eclipse/eclipse" />
</target>
<target name="gen.p2mirror.script" description="use XSLT to generate a p2.mirror script from .target">
@@ -94,9 +94,9 @@
<!-- /abs/path/to/eclipse -vm /opt/jdk1.6.0/bin/java -nosplash -data /tmp/workspace -consolelog -application
org.eclipse.ant.core.antRunner -f *.target.p2mirror.xml -Ddebug=true -DfollowStrict=true -Drepo.dir=/tmp/REPO/ -->
<target name="run.p2mirror.script" description="build target update site using p2.mirror">
- <exec executable="${WORKSPACE}/eclipse/eclipse" dir="${basedir}">
+ <exec executable="${WORKINGDIR}/eclipse/eclipse" dir="${basedir}">
<arg line=" -nosplash -data ${tmpdir}/workspace -consolelog -application org.eclipse.ant.core.antRunner" />
- <arg line=" -f ${targetFile}.p2mirror.xml -DfollowStrict=true -Drepo.dir=${WORKSPACE}/REPO/" />
+ <arg line=" -f ${targetFile}.p2mirror.xml -DfollowStrict=true -Drepo.dir=${WORKINGDIR}/REPO/" />
<arg line=" -Ddebug=true" />
</exec>
</target>
14 years, 3 months
JBoss Tools SVN: r25422 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-01 21:28:09 -0400 (Fri, 01 Oct 2010)
New Revision: 25422
Added:
trunk/build/target-platform/build.xml
trunk/build/target-platform/getArch.sh
Log:
new build.xml and getArch.sh for building target platform repo zip in Hudson (self-bootstrapping)
Added: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml (rev 0)
+++ trunk/build/target-platform/build.xml 2010-10-02 01:28:09 UTC (rev 25422)
@@ -0,0 +1,107 @@
+<project default="custom.hudson.build" name="jbosstools target platform p2.mirror generator - ant script for Hudson">
+ <property name="targetFile" value="e361-wtp322.target" />
+
+ <!-- if useLatest = true, omit versions from p2.mirror script to fetch latest version available;
+ if useLatest = false, include versions and fetch specific versions requested. -->
+ <property name="useLatest" value="true" />
+
+ <property name="tmpdir" value="${java.io.tmpdir}/target-platform-build" />
+
+ <!-- assume this is run from /WORKSPACE/sources/ == /trunk/build/ -->
+ <property name="WORKSPACE" value="${basedir}" />
+
+ <condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools" else="${java.io.tmpdir}">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <mkdir dir="${COMMON_TOOLS}" />
+
+ <condition property="build.xml" value="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml">
+ <available file="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build/build.xml">
+ <available file="${basedir}/../../build/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../build.xml">
+ <available file="${basedir}/../../build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../../sources/build.xml">
+ <available file="${basedir}/../../sources/build.xml" type="file" />
+ </condition>
+ <condition property="build.xml" value="${basedir}/../build.xml">
+ <available file="${basedir}/../build.xml" type="file" />
+ </condition>
+ <!-- if can't calculate where build/build.xml is located, must pass in path from parent when calling this script -->
+
+ <target name="custom.hudson.build" depends="init, get.arch, get.eclipse, gen.p2mirror.script, run.p2mirror.script, cleanup" />
+
+ <target name="init">
+ <ant antfile="${build.xml}" target="init" />
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target>
+
+ <target name="get.arch">
+ <if>
+ <os family="unix" />
+ <then>
+ <!-- Ant thinks that ${os.arch} == i386 for ${arch}, so use `uname` instead -->
+ <exec executable="bash" outputproperty="arch">
+ <arg line="getArch.sh" />
+ </exec>
+ </then>
+ <else>
+ <echo level="error">This script is only tested to work on Linux 32- and 64-bit Hudson slaves.</echo>
+ <condition property="arch" value="${arch}" else="">
+ <os arch="amd64" />
+ </condition>
+ </else>
+ </if>
+ </target>
+
+ <!-- only meant to work with linux 32- and 64-bit slaves -->
+ <target name="get.eclipse">
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
+ <property name="eclipse.version" value="eclipse-SDK-3.6.1" />
+ <if>
+ <equals arg1="${arch}" arg2="x86" />
+ <then>
+ <property name="eclipse.file" value="${eclipse.version}-linux-gtk.tar.gz" />
+ </then>
+ <else>
+ <property name="eclipse.file" value="${eclipse.version}-linux-gtk-${arch}.tar.gz" />
+ </else>
+ </if>
+
+ <if>
+ <not>
+ <available file="${WORKSPACE}/${eclipse.file}" type="file" />
+ </not>
+ <then>
+ <get src="${eclipse.URL}/${eclipse.file}" dest="${WORKSPACE}/${eclipse.file}" />
+ </then>
+ </if>
+ <untar compression="gzip" dest="${WORKSPACE}" src="${WORKSPACE}/${eclipse.file}" overwrite="true" />
+ <chmod perm="+x" file="${WORKSPACE}/eclipse/eclipse" />
+ </target>
+
+ <target name="gen.p2mirror.script" description="use XSLT to generate a p2.mirror script from .target">
+ <ant antfile="target2p2mirror.xml" />
+ </target>
+
+ <!-- /abs/path/to/eclipse -vm /opt/jdk1.6.0/bin/java -nosplash -data /tmp/workspace -consolelog -application
+ org.eclipse.ant.core.antRunner -f *.target.p2mirror.xml -Ddebug=true -DfollowStrict=true -Drepo.dir=/tmp/REPO/ -->
+ <target name="run.p2mirror.script" description="build target update site using p2.mirror">
+ <exec executable="${WORKSPACE}/eclipse/eclipse" dir="${basedir}">
+ <arg line=" -nosplash -data ${tmpdir}/workspace -consolelog -application org.eclipse.ant.core.antRunner" />
+ <arg line=" -f ${targetFile}.p2mirror.xml -DfollowStrict=true -Drepo.dir=${WORKSPACE}/REPO/" />
+ <arg line=" -Ddebug=true" />
+ </exec>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${tmpdir}" quiet="true" includeemptydirs="true" />
+ </target>
+</project>
Added: trunk/build/target-platform/getArch.sh
===================================================================
--- trunk/build/target-platform/getArch.sh (rev 0)
+++ trunk/build/target-platform/getArch.sh 2010-10-02 01:28:09 UTC (rev 25422)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if uname -m > /dev/null 2>&1; then
+ arch=`uname -m`
+else
+ arch=`uname -p`
+fi
+# Massage arch for Eclipse-uname differences
+case $arch in
+ i[0-9]*86)
+ arch=x86 ;;
+ ia64)
+ arch=ia64 ;;
+ ppc)
+ arch=ppc ;;
+ ppc64)
+ arch=ppc ;;
+ x86_64)
+ arch=x86_64 ;;
+ *)
+ echo "ERROR: Unrecognized architecture: $arch"
+ exit 1 ;;
+esac
+echo $arch
\ No newline at end of file
Property changes on: trunk/build/target-platform/getArch.sh
___________________________________________________________________
Name: svn:executable
+ *
14 years, 3 months