Skip to main content
Jump to: navigation, search


Revision as of 17:26, 15 March 2006 by Kmoir (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. User specific environment and startup programs

umask 002

BASE_PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin LD_LIBRARY_PATH=. BASH_ENV=$HOME/.bashrc USERNAME=`whoami` xhost +$HOSTNAME DISPLAY=:0.0 CVS_RSH=ssh ulimit -c unlimited export CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY


  1. notification list


  1. sets skip.performance.tests Ant property


  1. sets skip.tests Ant property


  1. by default we only tag map files for integration builds.


  1. This reflects the cvs tag of the the org.eclipse.releng.eclipsebuilder, org.eclipse.releng.basebuilder, and #internal project eclipseInternal Build Tools that we use.
  2. modify to suit your environment


  1. update property setting


  1. flag indicating whether or not mail should be sent to indicate build has started


  1. flag used to build based on changes in map files


  1. buildId - build name


  1. buildLabel - name parsed in php scripts <buildType>-<buildId>-<datestamp>


  1. tag for build contribution project containing .map files


  1. modify directory in which to export builder projects


  1. buildtype determines whether map file tags are used as entered or are replaced with HEAD


  1. modify directory where to copy build


  1. flag to indicate if test build


  1. value used in buildLabel and for text replacement in index.php template file

builddate=`date +%Y%m%d` buildtime=`date +%H%M` timestamp=$builddate$buildtime

  1. process command line arguments

usage="usage: $0 [-notify emailaddresses][-test][-buildDirectory directory][-u3|u4][-buildId name][-buildLabel directory name][-tagMapFiles][-mapVersionTag tag][-builderTag tag][-bootclasspath path][-compareMaps][-skipPerf] [-skipTest] M|N|I|S|R"

if [ $# -lt 1 ] then echo >&2 "$usage" exit 1 fi

while [ $# -gt 0 ] do case "$1" in -u3) update="-Dupdate=true";; -u4) update="-Dupdate=true -DversionParts=-add4thPart";; -buildId) buildId="$2"; shift;; -buildLabel) buildLabel="$2"; shift;; -mapVersionTag) mapVersionTag="$2"; shift;; -tagMapFiles) tagMaps="-DtagMaps=true";; -skipPerf) skipPerf="-Dskip.performance.tests=true";; -skipTest) skipTest="-Dskip.tests=true";; -buildDirectory) builderDir="$2"; shift;; -notify) recipients="$2"; shift;; -test) postingDirectory="/builds/transfer/files/bogus/downloads/drops";testBuild="-Dtest=true";; -builderTag) buildProjectTags="$2"; shift;; -compareMaps) compareMaps="-DcompareMaps=true";; -*) echo >&2 $usage exit 1;; *) break;; # terminate while loop esac shift done

  1. After the above the build type is left in $1.


  1. Set default buildId and buildLabel if none explicitly set

if [ "$buildId" = "" ] then buildId=$buildType$builddate-$buildtime fi

if [ "$buildLabel" = "" ] then buildLabel=$buildId fi

  1. tag for eclipseInternalBuildTools on ottcvs1


  1. tag for exporting org.eclipse.releng.basebuilder


  1. tag for exporting the custom builder


if [ -e $builderDir ] then builderDir=$builderDir$timestamp fi

  1. directory where features and plugins will be compiled


mkdir $builderDir cd $builderDir

  1. modify location to match your cvs repository location
  2. check out org.eclipse.releng.basebuilder

cvs -d co -r $baseBuilderTag org.eclipse.releng.basebuilder if [ "$tagMaps" == "-DtagMaps=true" ]; then

 cvs -d rtag -r $baseBuilderTag v$buildId org.eclipse.releng.basebuilder;


  1. modify location to match your cvs repository location
  2. check out org.eclipse.releng.eclipsebuilder

cvs -d co -r $customBuilderTag org.eclipse.releng.eclipsebuilder if [ "$tagMaps" == "-DtagMaps=true" ]; then

 cvs -d rtag -r $customBuilderTag v$buildId  org.eclipse.releng.eclipsebuilder;


  1. modify the following checkout and JVMs to match your cvs repository location
  2. check out eclipseInternalBuildTools and install custom plugins

cvs -d sdimitro@ottcvs1:/home/cvs/releng co -r $internalToolsTag eclipseInternalBuildTools if [ "$tagMaps" == "-DtagMaps=true" ]; then

 cvs -d sdimitro@ottcvs1:/home/cvs/releng rtag -r $internalToolsTag v$buildId eclipseInternalBuildTools;

fi cp -r eclipseInternalBuildTools/plugins org.eclipse.releng.basebuilder

  1. The URLs and filenames of vms used in build

linuxJdkArchive=jdks/ linuxppcJdkArchive=jdks/ windowsJreArchive=jdks/ windows15JdkArchive=jdks/

  1. get then install the Linux vm used for running the build

mkdir -p jdk/linux; cvs -d :pserver:anonymous@yourserver:/your/cvsroot co $linuxJdkArchive; unzip $linuxJdkArchive -d jdk/linux; rm $linuxJdkArchive

  1. get the install the Windows jre containing the Java libraries against which to compile

mkdir -p jdk/win32; cvs -d :pserver:anonymous@yourserver:/your/cvsroot co $windowsJreArchive;unzip $windowsJreArchive -d jdk/win32; rm $windowsJreArchive

  1. get and install the Windows 1.5 jre containing the 1.5 Java libraries against which to compile

mkdir -p jdk/win32_15; cvs -d :pserver:anonymous@yourserver:/your/cvsroot co $windows15JdkArchive;unzip $windows15JdkArchive -d jdk/win32_15/; rm $windows15JdkArchive

if [ "$HOSTNAME" == "eclipsebuildserv" ] then

   #get then install the Linuxppc vm used for running the build
   mkdir -p jdk/linuxppc; cvs -d :pserver:anonymous@ottcvs1:/home/cvs/releng co $linuxppcJdkArchive; unzip $linuxppcJdkArchive -d jdk/linuxppc; rm $linuxppcJdkArchive


mkdir -p $postingDirectory/$buildLabel chmod -R 755 $builderDir

  1. default value of the bootclasspath attribute used in ant javac calls.



  1. modify - we just have this line because we have two build servers, one linux-gtk-ppc and one linux-gtk-x86

if [ "$HOSTNAME" == "eclipsebuildserv" ] then

   PATH=$BASE_PATH:$builderDir/eclipseInternalBuildTools/bin/linux/:$builderDir/jdk/linuxppc/IBMJava2-ppc-142/jre/bin;export PATH


   PATH=$BASE_PATH:$builderDir/eclipseInternalBuildTools/bin/linux/:$builderDir/jdk/linux/jdk1.4.2_08/jre/bin;export PATH


cd org.eclipse.releng.eclipsebuilder

echo buildId=$buildId >> echo timestamp=$timestamp >> echo buildLabel=$buildLabel >> echo recipients=$recipients >> echo log=$postingDirectory/$buildLabel/index.php >>

  1. the base command used to run AntRunner headless

antRunner="`which java` -Xmx500m -jar ../org.eclipse.releng.basebuilder/startup.jar -Dosgi.os=linux -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"

  1. clean drop directories

$antRunner -buildfile eclipse/helper.xml cleanSites

echo recipients=$recipients echo postingDirectory=$postingDirectory echo builderTag=$buildProjectTags echo buildDirectory=$buildDirectory echo bootclasspath=$bootclasspath echo bootclasspath_15=$bootclasspath_15

  1. full command with args

buildCommand="$antRunner -buildfile buildAll.xml $mail $testBuild $compareMaps -DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory -Dbootclasspath=$bootclasspath -DbuildType=$buildType -D$buildType=true -DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildLabel -Dtimestamp=$timestamp $skipPerf $skipTest $tagMaps -DJ2SE-1.5=$bootclasspath_15 -listener"

  1. capture command used to run the build

echo $buildCommand>command.txt

  1. run the build

$buildCommand retCode=$?

if [ $retCode != 0 ] then

       echo "Build failed (error code $retCode)."
       exit -1


  1. clean up

rm -rf $builderDir

Back to the top