From: Markus B. <mba...@us...> - 2005-12-22 23:13:30
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18405/cruiseControl Added Files: build.properties customTargets.xml config.xml build-RDT.xml build-RDT.properties Log Message: config.xml is a cruiseControl config file, build-RDT.properties and build-RDT.xml are used from config.xml and for building integration and release builds, customTargets.xml and build.properties are slightly adapted and moved from the bootstrap directory --- NEW FILE: build-RDT.properties --- rdtBuildHome=/home/bma # buildDirectory is the directory into which the source are checked out and # where the build takes place buildDirectory=${rdtBuildHome}/cruiseControlWorkspace/checkout/RDT # the eclipse instance used for build eclipseDir=${rdtBuildHome}/eclipse/eclipse-3.1 # the pdeBuildPluginVersion is needed in order to construct the directory # where the pde build scripts are located pdeBuildPluginVersion=3.1.0 buildfile=${eclipseDir}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/build.xml # customTargets.xml and a corresponding build.properties are found in the the builderDirectory builderDirectory=${rdtBuildHome}/cruiseControlWorkspace # Make Ant verbose #verboseAnt=-verbose verboseAnt= eclipseAutomatedTestHome=${rdtBuildHome}/rdt/eclipse-testing rubyInterpreter=/usr/bin/ruby1.6 docbookRoot=${rdtBuildHome}/rdt/docbook os=linux ws=gtk arch=x86 usePserver=-DDontusePserver=true # the default is to clean up before testing, it can be avoided by defining noclean #testNoclean=-Dnoclean=true testNoclean=-Dxx=true #dontRunTests=-DdontRunTests=true dontRunTests=-Dxxx=true # buildTarget can be one of the build targets defined in $buildfile: # main, preBuild, fetch, generate, process, assemble, package, postBuild, clean buildTarget=main #buildTarget=postBuild extraArgs=-DnoExtraArgs --- NEW FILE: customTargets.xml --- <project name="Build specific targets and properties" default="noDefault" > <condition property="isNightlyBuild"> <equals arg1="${buildType}" arg2="N"/> </condition> <condition property="isNightlyOrIntegrationBuild"> <or> <equals arg1="${buildType}" arg2="N"/> <equals arg1="${buildType}" arg2="I"/> </or> </condition> <echo message="BuildType: ${buildType}"/> <property file="${buildDirectory}/version.properties"/> <property name="buildLabel" value="${buildType}-${featureVersion}"/> <property name="buildId" value="${featureVersion}"/> <!-- ===================================================================== --> <!-- Run a given ${target} on all elements being built --> <!-- Add on <ant> task for each top level element being built. --> <!-- ===================================================================== --> <target name="allElements"> <ant antfile="${genericTargets}" target="${target}" > <property name="type" value="feature" /> <property name="id" value="org.rubypeople.rdt" /> </ant> <ant antfile="${genericTargets}" target="${target}" > <property name="type" value="feature" /> <property name="id" value="org.rubypeople.rdt-tests" /> </ant> </target> <!-- ===================================================================== --> <!-- Targets to assemble the built elements for particular configurations --> <!-- These generally call the generated assemble scripts (named in --> <!-- ${assembleScriptName}) but may also add pre and post processing --> <!-- Add one target for each root element and each configuration --> <!-- ===================================================================== --> <target name="assemble.org.rubypeople.rdt"> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> <property name="zipargs" value="" /> </ant> </target> <target name="assemble.org.rubypeople.rdt-tests"> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"> <property name="zipargs" value="" /> </ant> </target> <!-- ===================================================================== --> <!-- Check out map files from correct repository --> <!-- Replace values for cvsRoot, package and mapVersionTag as desired. --> <!-- ===================================================================== --> <target name="getMapFiles"> <antcall target="getMapFilesWithExtMethod"/> <antcall target="getMapFilesWithPserverMethod"/> </target> <target name="getMapFilesWithExtMethod" unless="usePserver"> <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> </target> <target name="getMapFilesWithPserverMethod" if="usePserver"> <property name="cvsRoot" value=":pserver:ano...@cv...:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> <replace dir="${buildDirectory}/maps" value=":pserver:anonymous@"> <include name="**/*.map"/> <replacetoken>:ext:</replacetoken> </replace> </target> <!-- ===================================================================== --> <!-- Steps to do before setup --> <!-- ===================================================================== --> <target name="preSetup" unless="featureVersion"> <tstamp> <!-- unfortunately one "y" in the pattern pads with 0, so 2005 will be displayed as 05 --> <format property="build.tstamp" pattern="5MMddhhmm"/> </tstamp> <condition property="featureVersion" value="${nightlyBuildFeatureVersionPrefix}${build.tstamp}NGT"> <equals arg1="${buildType}" arg2="N"/> </condition> <condition property="featureVersion" value="${nightlyBuildFeatureVersionPrefix}${build.tstamp}INT"> <equals arg1="${buildType}" arg2="I"/> </condition> <fail unless="featureVersion" message="Property featureVersion must be set. Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix."/> <echo message="Using featureVersion: ${featureVersion}."/> <echo file="${buildDirectory}/version.properties" message="featureVersion=${featureVersion}"/> </target> <!-- ===================================================================== --> <!-- Steps to do after setup but before starting the build proper --> <!-- ===================================================================== --> <target name="postSetup"> </target> <!-- ===================================================================== --> <!-- Steps to do before fetching the build elements --> <!-- ===================================================================== --> <target name="preFetch"> </target> <!-- ===================================================================== --> <!-- Steps to do after fetching the build elements --> <!-- ===================================================================== --> <target name="postFetch"> <antcall target="replaceVersions"/> <replace file="${buildDirectory}/features/org.rubypeople.rdt/feature.xml"> <replacefilter token="<!--@@INCLUDES@@-->" value="<includes id="org.rubypeople.rdt.source" version="${featureVersion}"/>"/> </replace> <replace file="${buildDirectory}/features/org.rubypeople.rdt/build.properties"> <replacefilter token="#generate.feature" value="generate.feature" /> </replace> </target> <target name="replaceVersions" if="baseFeatureVersion"> <condition property="updateSiteUrl" value="${nightlyBuildUpdateSiteURL}" else="${integrationBuildUpdateSiteURL}"> <isset property="isNightlyBuild"/> </condition> <echo message="Nightly or integration build: replacing version ${baseFeatureVersion} with ${featureVersion}"/> <echo message="Setting update-site URL: ${updateSiteUrl}"/> <replace dir="${buildDirectory}/features"> <include name="org.rubypeople.*/feature.xml"/> <replacefilter token="${baseFeatureVersion}" value="${featureVersion}" /> <replacefilter token="${releaseUpdateSiteURL}" value="${updateSiteUrl}" /> </replace> <replace dir="${buildDirectory}/plugins"> <include name="org.rubypeople.*/plugin.xml"/> <replacefilter token="${baseFeatureVersion}" value="${featureVersion}" /> </replace> <replace dir="${buildDirectory}/plugins"> <include name="org.rubypeople.*/META-INF/MANIFEST.MF"/> <replacefilter token="Bundle-Version: ${baseFeatureVersion}" value="Bundle-Version: ${featureVersion}" /> </replace> </target> <!-- ===================================================================== --> <!-- Steps to do before generating the build scripts. --> <!-- ===================================================================== --> <target name="preGenerate"> <fail unless="featureVersion" message="Property featureVersion must be set. Either directly or in case of a nightly build with nightlyBuildFeatureVersionPrefix."/> </target> <!-- ===================================================================== --> <!-- Steps to do after generating the build scripts. --> <!-- ===================================================================== --> <target name="postGenerate"> </target> <!-- ===================================================================== --> <!-- Steps to do before running the build.xmls for the elements being built. --> <!-- ===================================================================== --> <target name="preProcess"> </target> <!-- ===================================================================== --> <!-- Steps to do after running the build.xmls for the elements being built. --> <!-- ===================================================================== --> <target name="postProcess"> </target> <!-- ===================================================================== --> <!-- Steps to do before running assemble. --> <!-- ===================================================================== --> <target name="preAssemble"> </target> <!-- ===================================================================== --> <!-- Steps to do after running assemble. --> <!-- ===================================================================== --> <target name="postAssemble"> </target> <!-- ===================================================================== --> <!-- Steps to do after the build is done. --> <!-- ===================================================================== --> <target name="postBuild"> <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite"/> <property name="sitePackagePrefix" value="org.rubypeople.updatesite"/> <antcall target="generateUpdateSite"/> <antcall target="test"/> <antcall target="package"/> </target> <!-- ===================================================================== --> <!-- Steps to test the build results --> <!-- ===================================================================== --> <target name="test" unless="dontRunTests"> <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> <delete> <fileset dir="${eclipseAutomatedTestHome}" includes="**/*RDT*.zip"/> </delete> <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-RDT-${buildId}.zip" /> <copy file="${buildDirectory}/${buildLabel}/org.rubypeople.rdt-tests-${buildId}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-RDT-${buildId}.zip" /> <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="runtests" dir="${eclipseAutomatedTestHome}"> <property name="os" value="${baseos}" /> <property name="ws" value="${basews}" /> <property name="arch" value="${basearch}" /> <property name="testPlugin" value="org.rubypeople.rdt.tests.all_${featureVersion}" /> <property name="report" value="org.rubypeople.rdt.tests.all" /> </ant> </target> <!--======================================================--> <!-- UpdateSite Export target --> <!-- ==================================================== --> <target name="updateSiteExport"> <ant antfile="build.xml" dir="${buildDirectory}/features/${id}/" target="build.update.jar"> <property name="feature.destination" value="${UpdateSiteStagingLocation}/features"/> <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins"/> </ant> </target> <target name="generateUpdateSite"> <!-- Create the directory structure --> <mkdir dir="${UpdateSiteStagingLocation}"/> <mkdir dir="${UpdateSiteStagingLocation}/features"/> <mkdir dir="${UpdateSiteStagingLocation}/plugins"/> <!-- Build the jar files --> <antcall target="allElements"> <param name="genericTargets" value="${builder}/customTargets.xml"/> <param name="target" value="updateSiteExport"/> </antcall> <antcall target="copySiteXmlFromCvs"/> <antcall target="createNightlyBuildSiteXml"/> <delete dir="${buildDirectory}/temp.updatesite"/> </target> <target name="copySiteXmlFromCvs" unless="isNightlyBuild"> <!-- Grab the rest of the site out of CVS --> <mkdir dir="${buildDirectory}/temp.updatesite"/> <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" package="${sitePackagePrefix}" dest="${buildDirectory}/temp.updatesite" tag="${fetchTag}"/> <!-- Copy to staging area --> <copy todir="${UpdateSiteStagingLocation}"> <fileset file="${buildDirectory}/temp.updatesite/${sitePackagePrefix}/site.xml"/> </copy> </target> <target name="createNightlyBuildSiteXml" if="isNightlyOrIntegrationBuild"> <echo file="${UpdateSiteStagingLocation}/site.xml"><?xml version="1.0" encoding="UTF-8"?> <site> <description url="http://rubyeclipse.sourceforge.net/nightlyBuild/updateSite/"> The Ruby Development Tools update site. </description> <feature url="features/org.rubypeople.rdt_${featureVersion}.jar" id="org.rubypeople.rdt" version="${featureVersion}"> <category name="RubyEclipseNightlyBuild"/> </feature> <category-def name="RubyEclipseNightlyBuild" label="RDT Nigthly Build"> </category-def> </site> </echo> </target> <target name="package"> <echo message="Creating and filling ${buildResultsDirectory}" /> <mkdir dir="${buildResultsDirectory}"/> <mkdir dir="${buildResultsDirectory}/logs"/> <copy todir="${buildResultsDirectory}/logs" flatten="true"> <fileset dir="${buildDirectory}"> <include name="**/*.log"/> </fileset> </copy> <copy todir="${buildResultsDirectory}" flatten="true"> <fileset dir="${buildDirectory}"> <include name="**/org.rubypeople.rdt-*.zip"/> <include name="**/Changelog.txt"/> <!-- exclude the org.rubypeople.rdt-tests-*.zip file --> <exclude name="**/*-tests-*"/> </fileset> <fileset dir="${eclipseAutomatedTestHome}/results/html"> <include name="*.html"/> </fileset> </copy> <copy file="${buildDirectory}/workspace-rdt-tests/.metadata/.log" tofile="${buildResultsDirectory}/logs/testsWorkspace.log"/> <mkdir dir="${buildResultsDirectory}/updateSite"/> <copy todir="${buildResultsDirectory}/updateSite"> <fileset dir="${buildDirectory}/updateSite"/> </copy> <mkdir dir="${buildResultsDirectory}/doc"/> <copy todir="${buildResultsDirectory}/doc"> <fileset dir="${buildDirectory}/plugins/org.rubypeople.rdt.doc.user"> <include name="html/**/*"/> <include name="images/**/*"/> </fileset> </copy> </target> <!-- ===================================================================== --> <!-- Steps to do to publish the build results --> <!-- ===================================================================== --> <target name="publish"> </target> <!-- ===================================================================== --> <!-- Default target --> <!-- ===================================================================== --> <target name="noDefault"> <echo message="You must specify a target when invoking this file" /> </target> </project> --- NEW FILE: build-RDT.xml --- <!-- Delegating build script, used by cruisecontrol to build MY_PROJECT_1. Note that the basedir is set to the checked out project --> <project name="build-RDT" default="build"> <!-- basedir="/home/markus/java/cruiseControlWorkingArea/checkout/RDT"> --> <target name="propertiesCCBuild"> <property file="build-RDT.properties" /> </target> <target name="clean"> <echo message="Cleaning directory ${buildDirectory}"/> <delete dir="${buildDirectory}"/> <mkdir dir="${buildDirectory}"/> </target> <target name="featureVersion"> <!-- use the label provided from the EclipseLableProvider --> <!-- <echo message="Using feature version ${label}"/> --> <echo file="${buildDirectory}/version.properties" message="featureVersion=${label}"/> </target> <target name="build"> <java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true" jvmargs="${extraArgs}"> <arg value="-ws" /> <arg value="${ws}" /> <arg value="-os" /> <arg value="${os}" /> <arg value="-application" /> <arg value="org.eclipse.ant.core.antRunner" /> <arg value="-buildfile" /> <arg value="${buildfile}" /> <arg value="${buildTarget}" /> <arg value="-data" /> <arg value="${buildDirectory}/workspace" /> <arg value="${verboseAnt}" /> <jvmarg value="${usePserver}" /> <jvmarg value="${dontRunTests}" /> <jvmarg value="-Dbasews=${ws}" /> <jvmarg value="-Dbaseos=${os}" /> <jvmarg value="-Dbasearch=${arch}" /> <jvmarg value="-Dbuilder=${builderDirectory}" /> <jvmarg value="${testNoclean}"/> <jvmarg value="-DjavacFailOnError=true"/> <jvmarg value="-DbuildDirectory=${buildDirectory}"/> <jvmarg value="-DbaseLocation=${eclipseDir}"/> <jvmarg value="-DeclipseAutomatedTestHome=${eclipseAutomatedTestHome}"/> <jvmarg value="-Drdt.rubyInterpreter=${rubyInterpreter}" /> <jvmarg value="-Drdt-tests-workspace=${buildDirectory}/workspace-rdt-tests" /> <jvmarg value="-Ddocbook.root=${docbookRoot}" /> <!--<jvmarg value="${extraArgs}"/>--> <classpath> <pathelement location="${eclipseDir}/startup.jar" /> </classpath> </java> </target> <target name="dist" depends="propertiesCCBuild,clean,featureVersion,build"> </target> <target name="0.7.0.RC1"> <property name="cvsLabel" value="R2005-12-22_0-7-0_RC1"/> <property name="label" value="0.7.0.512222200RC1"/> <antcall target="integration"/> </target> <target name="integration"> <!-- the only difference to a nightly build is the buildType which leads to setting a differnt updateSiteUrl in feature.xml --> <property name="buildDirectory" value="/tmp/rdt-I"/> <!-- properties which should override the values of org.rubypeople.rdt/bootstrap/build.properties must be specified via -D arguments for the call to eclipseRunner --> <property name="extraArgs" value="-DbuildType='I' -DfetchTag=${cvsLabel}"/> <property file="build-RDT.properties" /> <antcall target="clean"/> <antcall target="featureVersion"/> <antcall target="build"/> </target> <target name="deploy"> <scp todir="mbarchfe:${deployTargetPassword}@shell.sf.net:/home/bma/"> <fileset dir="${buildDirectory}/dist"/> </scp> </target> </project> --- NEW FILE: build.properties --- ############################################################################### # Copyright (c) 2003, 2004 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Common Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/cpl-v10.html # # Contributors: # IBM Corporation - initial API and implementation ############################################################################### ##################### # Parameters describing how and where to execute the build. # Typical users need only update the following properties: # baseLocation - where things you are building against are installed # bootclasspath - The base jars to compile against (typicaly rt.jar) # configs - the list of {os, ws, arch} configurations to build. # # Of course any of the settings here can be overridden by spec'ing # them on the command line (e.g., -DbaseLocation=d:/eclipse ############# CVS CONTROL ################ # The CVS tag to use when fetching the map files from the repository mapVersionTag=HEAD # The CVS tag to use when fetching elements to build. By default the # builder will use whatever is in the maps. Use this value to override # for example, when doing a nightly build out of HEAD fetchTag=HEAD ############## BUILD / GENERATION CONTROL ################ # The directory into which the build elements will be fetched and where # the build will take place. # Do not enter relative paths, because otherwise the directory.txt file # won't be found # If relative , the directory would be relative to the $builder directory #buildDirectory=D:\\Temp\\buildresult3 # Type of build. Used in naming the build output. Typically this value is # one of I, N, M, S, ... # If you change this, please also see the featureVersion and baseFeatureVersion properties below buildType=N # ID of the build. Used in naming the build output. (the zip file) # buildId is set in customTargets.xml in order to consider a dynamic featureVersion for nightlyBuild #buildId=${featureVersion} # Label for the build. Used in naming the build output (the directory) # buildLabel is set in customTargets.xml in order to consider a dynamic featureVersion for nightlyBuild #buildLabel=${featureVersion} # Timestamp for the build. Used in naming the build output #timestamp=007 # Base location for anything the build needs to compile against. For example, # when building GEF, the baseLocation should be the location of a previously # installed Eclipse against which the GEF code will be compiled. #baseLocation=D:\\eclipse-3.0 #Os/Ws/Arch/nl of the eclipse specified by baseLocation #baseos #basews #basearch #basenl # The location underwhich all of the build output will be collected. # This is a subdirectory of $buildDirectory # Set collectingFolder and archivePrefix to . if you want to create archives without # trailing eclipse in the paths of the included files collectingFolder=. # The prefix that will be used in the generated archive. # Does not make sense to use a different archivePrefix than collectingFolder, # because zip wouldn't find any files to include into the target zip otherwise archivePrefix=. # The list of {os, ws, arch} configurations to build. This # value is a '&' separated list of ',' separate triples. For example, # configs=win32,win32,x86 & linux,motif,x86 # By default the value is *,*,* #configs=*,*,* #Arguments to send to the zip executable # Doesn't work #zipArgs=-z "RDT: extract into eclipse-installation directory" ############# JAVA COMPILER OPTIONS ############## # The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE #bootclasspath=d:/ibm1.3.1/jre/lib/rt.jar #bootclasspath=D:\\java\\j2sdk1.4.2_05\\jre\\lib\\rt.jar # Whether or not to include debug info in the output jars javacDebugInfo=true # Whether or not to fail the build if there are compiler errors javacFailOnError=true # The version of the source code javacSource=1.4 # The version of the byte code targeted #javacTarget=1.1 #collPlace=eclipse #collBase=. #collectingFolder=eclipse #archivePrefix=eclipse # Depending on the build type, define either baseFeatureVersion or featureVersion # A) Nightly Build # In the case of a nightly build the property featureVersion will be created in # customTargets.xml. It will include a timestamp in the minor version number. # The baseFeatureVersion must be set, because it is used to replace the version in the # feature.xml files of the rdt feature.xml and the test feature.xml with the created featureVersion baseFeatureVersion=0.6.0 # B) Every other Build type # featureVersion is used for setting the version of org.rubypeople.rdt.doc.user/plugin.xml # and for calling the appropriate test suite in customTargets.xml # #featureVersion=0.6.0 # if the buildType is N a property featureVersion will be created in # customTargets.xml. The featureVersion consists of the nightlyBuildFeatureVersionPrefix # concatenated with a timestamp in the format yyyyMMddhhmm nightlyBuildFeatureVersionPrefix=0.7.0. # the buildResultsDirectory specifies a directory into which the build results are copied # after a successful build buildResultsDirectory=${buildDirectory}/dist # There are three update site URLs for three streams of RDT builds: releases, integration # and nightly builds. For each build the appropriate URL must be placed into feature.xml # The feature.xml file contains the release update site by default releaseUpdateSiteURL=http://rubyeclipse.sourceforge.net/updatesite # in case of a nightly or integration build the releaseUpdateSiteURL in feature.xml is # replaced with one of the following entries nightlyBuildUpdateSiteURL=http://rubyeclipse.sourceforge.net/nightlyBuild/updateSite integrationBuildUpdateSiteURL=http://updatesite.rubypeople.org/rdt/integration --- NEW FILE: config.xml --- <cruisecontrol> <plugin name="labelincrementer" prefix="0.5"/> <project name="RDT" buildafterfailed="true"> <plugin name="labelincrementer" classname="org.rubypeople.rdt.cruisecontrol.plugin.EclipsePluginLabelProvider"/> <!-- Defines where cruise looks for changes, to decide whether to run the build --> <modificationset quietperiod="10"> <cvs cvsroot=":ext:mba...@cv...:/cvsroot/rubyeclipse" module="rdt-all"/> </modificationset> <!-- Configures the actual build loop, how often and which build file/target --> <schedule interval="60"> <ant antscript="/home/bma/apache-ant-1.6.5/bin/ant" buildfile="build-RDT.xml" target="dist" uselogger="true" usedebug="false"/> </schedule> <log dir="logs/RDT"> <merge dir="/home/bma/rdt/eclipse-testing/results/xml"/> </log> <!-- more recent versions of CC should use the listener below, instead of the currentbuildstatusbootstrapper, currentbuildstatuspublisher combination. NOTE: Must match filename in CC reporting/jsp - override.properties: user.build.status.file --> <listeners> <currentbuildstatuslistener file="logs/RDT/buildstatus.txt"/> </listeners> <!-- Publishers are run *after* a build completes --> <publishers> <onsuccess> <artifactspublisher dir="checkout/RDT/dist" dest="artifacts/RDT"/> <execute command="/home/bma/dispatchRdtBuildResultsNightly.sh"/> </onsuccess> <email mailhost="mail.sf.net" returnaddress="mba...@us..." buildresultsurl="http://213.239.199.113:8080/cruisecontrol/buildresults/RDT" skipusers="false" spamwhilebroken="false"> <always address="rub...@li..."/> </email> </publishers> </project> </cruisecontrol> |