Author: ben
Date: 2007-01-23 10:35:30 -0800 (Tue, 23 Jan 2007)
New Revision: 3487

Modified:
   tools/trunk/build-tools/nightly/build.xml
   tools/trunk/build-tools/nightly/nightly-go.sh
Log:
This is the working nightly build scripts as they've been in place for a few 
weeks.

Modified: tools/trunk/build-tools/nightly/build.xml
===================================================================
--- tools/trunk/build-tools/nightly/build.xml   2007-01-23 17:35:02 UTC (rev 
3486)
+++ tools/trunk/build-tools/nightly/build.xml   2007-01-23 18:35:30 UTC (rev 
3487)
@@ -1,90 +1,90 @@
 <project name="nightly" default="build">
-    
+
     <description>
-This project drives builds of various projects on various architectures. 
-It can be parameterized for various targets, platforms, projects, and 
-network usage, by defining properties. 
+This project drives builds of various projects on various architectures.
+It can be parameterized for various targets, platforms, projects, and
+network usage, by defining properties.
 
 Usage information: TODO update usage informat [bshine 11.15.2006]
 
-Copyright 2006 Laszlo Systems
-    </description> 
-    
+Copyright 2007 Laszlo Systems
+    </description>
+
     <property environment="env" />
     <property file="nightly.properties" />
 
-    <!-- These properties can and should be overridden on the command line or 
with the nightly.properties file --> 
-    <property name="build.project"       value="openlaszlo" />    
+    <!-- These properties can and should be overridden on the command line or 
with the nightly.properties file -->
+    <property name="build.project"       value="openlaszlo" />
     <property name="build.target"        value="build" />
-    <property name="build.branch"        value="trunk" /> 
+    <property name="build.branch"        value="trunk" />
     <property name="build.version"       value="3.3.x" />
 
-    <!-- Describe where the build should take place --> 
+    <!-- Describe where the build should take place -->
     <property name="tmp.dir" value="${env.HOME}/builds" />
 
     <property name="build.mail.sender"   value="[EMAIL PROTECTED]"/>
     <property name="build.mail.receiver" value="[EMAIL PROTECTED]"/>
     <property name="build.mail.host"     value="mail.laszlosystems.com" />
-    
+
     <!-- Describe where to install the servlet to. These should be overriden
     at the command line. For example these command line arguments work:
-    -Ddeploy.user=ben -Dtomcat.user=ben -Dtomcat.password=password 
-    -Dbuild.branch=branches/legals  -Dbuild.version=4.0.x 
-    -Ddeploy.destdir=/home/ben/tmp -Dtom.username=ben -Dtom.password=password 
-    -Dtomcat.host=linux-builder enable-deploy init deploy     
+    -Ddeploy.user=ben -Dtomcat.user=ben -Dtomcat.password=password
+    -Dbuild.branch=branches/legals  -Dbuild.version=4.0.x
+    -Ddeploy.destdir=/home/ben/tmp -Dtom.username=ben -Dtom.password=password
+    -Dtomcat.host=linux-builder enable-deploy init deploy
     (Note that we are not storing a valid username and password here, because
     we don't want to make this information public.) -->
     <property name="tomcat.host" value="localhost" />
-    <property name="tomcat.port" value="8080" />    
+    <property name="tomcat.port" value="8080" />
     <property name="tomcat.home" value="${env.TOMCAT_HOME}" />
-    <property name="tomcat.username" value="admin" />    
-    <property name="tomcat.password" value="laszlo" />   
-    <property name="tomcat.contextpath" value="/unknown-nightly" />       
-    <fail unless="tomcat.home" message="tomcat.home is not set."/>     
-    
+    <property name="tomcat.username" value="admin" />
+    <property name="tomcat.password" value="laszlo" />
+    <property name="tomcat.contextpath" value="/unknown-nightly" />
+    <fail unless="tomcat.home" message="tomcat.home is not set."/>
+
     <property name="path.tag"
         
value="http://svn.openlaszlo.org/${build.project}/builds/${build.name}";    />
 
-     <property name="deploy.destdir" 
value="${deploy.destparentdir}/${build.name}" />              
+     <property name="deploy.destdir" 
value="${deploy.destparentdir}/${build.name}" />
      <property name="tomcat.localwar"
-         
value="file:${deploy.destdir}/lps-${build.version}/Server/lps-${build.version}" 
/>        
-    
+         
value="file:${deploy.destdir}/lps-${build.version}/Server/lps-${build.version}" 
/>
 
+
     <!-- The username and password to use on the deployment machine.
     Unix user, not tomcat user.     -->
     <property name="deploy.user" value="exampleuser" />
-    <property name="deploy.destparentdir" value="/home/ben/tmp" />    
-    
-    <!-- The tomcattasks.properties files creates the association between a 
-        task name and a class name. The classpath declared in this taskdef 
-        points to the jar file which has the implementation of the ant tomcat 
+    <property name="deploy.destparentdir" value="/home/ben/tmp" />
+
+    <!-- The tomcattasks.properties files creates the association between a
+        task name and a class name. The classpath declared in this taskdef
+        points to the jar file which has the implementation of the ant tomcat
         manager tasks. -->
-    <taskdef file="tomcattasks.properties" />    
-    
+    <taskdef file="tomcattasks.properties" />
+
     <target name="init" depends="-check-args" unless="done.init">
         <tstamp/>
-        
+
         <script language="javascript"><![CDATA[
-            var branchstr = nightly.getProperty("build.branch");            
+            var branchstr = nightly.getProperty("build.branch");
             var betterstr = branchstr.replace("/", "-");
-            nightly.setProperty("build.branch-no-dashes", betterstr); 
+            nightly.setProperty("build.branch-no-dashes", betterstr);
         ]]></script>
-        
+
         <property name="build.name"
             
value="${build.revision}-${build.project}-${build.branch-no-dashes}" />
 
-        <!-- print a lot of diagnostic information --> 
+        <!-- print a lot of diagnostic information -->
         <echo message="revision is ${build.revision}" />
         <echo message="build.name is ${build.name}" />
-        <echo message="local war is ${tomcat.localwar}" />        
-        <echo message="path.tag is ${path.tag}" /> 
-        
-        <property name="done.init" value="true" />    
+        <echo message="local war is ${tomcat.localwar}" />
+        <echo message="path.tag is ${path.tag}" />
+
+        <property name="done.init" value="true" />
     </target>
-    
+
     <target name="-check-args" unless="done.check-args"
         description="make sure we have good values for all the required 
properties.">
-        <tstamp/>        
+        <tstamp/>
         <fail message="build.revision is not set. Use -Dbuild.revision=num">
             <condition>
                 <not>
@@ -92,35 +92,35 @@
                 </not>
             </condition>
         </fail>
-        <property name="done.check-args" value="true" />            
+        <property name="done.check-args" value="true" />
     </target>
-    
-    <target name="make-download-dest-dir" 
-        description="Create a directory on download.openlaszlo.org into which 
the products of this build will go." 
-       if="build.post.do">
+
+    <target name="make-download-dest-dir"
+        description="Create a directory on download.openlaszlo.org into which 
the products of this build will go."
+    if="build.post.do">
         <exec executable="/usr/bin/ssh">
             <arg value="[EMAIL PROTECTED]" />
-            <arg value="mkdir -p 
~/download.openlaszlo.org/nightly/${build.name}" />            
+            <arg value="mkdir -p 
~/download.openlaszlo.org/nightly/${build.name}" />
         </exec>
         <exec executable="/usr/bin/ssh">
             <arg value="[EMAIL PROTECTED]" />
-            <arg value="echo 'Created ${build.name} on ${TODAY} at ${TSTAMP} 
by ${user.name}. For svn, see ${path.tag}. To download, see 
http://download.openlaszlo.org/nightly/${build.name}' >> 
~/download.openlaszlo.org/nightly/log.txt" />            
+            <arg value="echo 'Created ${build.name} on ${TODAY} at ${TSTAMP} 
by ${user.name}. For svn, see ${path.tag}. To download, see 
http://download.openlaszlo.org/nightly/${build.name}' >> 
~/download.openlaszlo.org/nightly/log.txt" />
         </exec>
 
     </target>
-    
+
     <target name="push-to-children" description="Push a copy of the clean tree 
to the windows and mac builder machines">
         <ant target="push-to-windows" />
-        <ant target="push-to-mac" />    
+        <ant target="push-to-mac" />
     </target>
-    
-    <target name="build"   description="Build this build on all enabled 
architectures (see targets enable-windows-build, enable-mac-build, 
enable-linux-build)" 
+
+    <target name="build"   description="Build this build on all enabled 
architectures (see targets enable-windows-build, enable-mac-build, 
enable-linux-build)"
         depends="init" >
-            <ant target="do-linux-build"/>        
+            <ant target="do-linux-build"/>
             <ant target="kick-off-windows" />
             <ant target="kick-off-mac" />
     </target>
-    
+
     <target name="svn-make-tag" description="Create a tag in svn"
         unless="svn-make-tag.done"
         >
@@ -134,156 +134,161 @@
         </exec>
         <property name="svn-make-tag.done" value="true" />
     </target>
-    
-    <target name="svn-get-source" description="Check out a tree matching the 
tag" 
+
+    <target name="svn-get-source" description="Check out a tree matching the 
tag"
         unless="svn-get-source.done">
         <exec executable="svn">
             <arg value="checkout" />
             <arg value="${path.tag}" />
-            <arg value="-q" />            
+            <arg value="-q" />
             <arg value="${tmp.dir}/${build.name}" />
         </exec>
-        <property name="svn-get-source.done" value="true" />        
+        <property name="svn-get-source.done" value="true" />
     </target>
 
-    
+
     <target name="do-linux-build" if="linux.do"
         unless="linux-build.done">
         <ant dir="${tmp.dir}/${build.name}" target="${build.target}" 
inheritAll="false">
             <property name="LPS_HOME" value="${tmp.dir}/${build.name}" />
-           <property name="ANT_HOME" value="${env.ANT_HOME}" />
-           <property name="build.id" value="${build.name}" />
-        </ant>    
-        <property name="linux-build.done" value="true" />        
+            <property name="ANT_HOME" value="${env.ANT_HOME}" />
+            <property name="build.id" value="${build.name}" />
+        </ant>
+        <property name="linux-build.done" value="true" />
     </target>
 
     <target name="megatest">
-        <echo message="Stating megatest with build root dir going to be 
${tmp.dir}/${build.name}" />        
+        <echo message="Stating megatest with build root dir going to be 
${tmp.dir}/${build.name}" />
         <ant dir="${tmp.dir}/${build.name}" target="megatest" 
inheritAll="false">
             <property name="LPS_HOME" value="${tmp.dir}/${build.name}" />
-           <property name="ANT_HOME" value="${env.ANT_HOME}" />
-        </ant>            
+            <property name="ANT_HOME" value="${env.ANT_HOME}" />
+            <property name="headless" value="true" />
+        </ant>
         <echo message="Done with megatest." />
     </target>
-    
 
-    <target name="push-to-windows" 
+
+    <target name="push-to-windows"
         unless="windows.pushed"
+        if="windows.do"
         >
         <exec executable="rsync">
             <arg value="-aqz" />
             <arg value="--exclude=.svn"/>
+            <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}"/>
+            <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}-src"/>
+            <arg value="--exclude=*.tgz"/>            
             <arg value="${tmp.dir}/${build.name}" />
             <arg value="[EMAIL PROTECTED]:~/builds" />
         </exec>
         <property name="windows.pushed" value="true" />
     </target>
 
-    <target name="kick-off-windows">
-           <exec executable="ssh" spawn="true">
-               <arg value="[EMAIL PROTECTED]" />
-               <arg value="./windows-builder-go.sh" />
-               <arg value="${build.revision}" />
-               <arg value="${build.branch}" />         
-               <arg value="dist-dev" />                
-           </exec>
+    <target name="kick-off-windows" if="windows.do">
+        <exec executable="ssh" spawn="true">
+        <arg value="[EMAIL PROTECTED]" />
+        <arg value="./windows-builder-go.sh" />
+        <arg value="${build.revision}" />
+        <arg value="${build.branch}" />
+        <arg value="dist-dev" />
+        </exec>
     </target>
 
-<!-- TODO [bshine 11.14.2006] don't push the distros. that's a 
+<!-- TODO [bshine 11.14.2006] don't push the distros. that's a
 waste of bandwidth, because they won't be used on the slave machine -->
-    <target name="push-to-mac" 
+    <target name="push-to-mac"
         unless="mac.pushed">
-           <exec executable="rsync">
-                       <arg value="-aqz" />
-                       <arg value="--exclude=.svn"/>
-                       <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}"/>
-                       <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}-src"/>
-                       <arg value="--exclude=*.tgz"/>  
-                       <arg value="${tmp.dir}/${build.name}" />
-                       <arg value="[EMAIL PROTECTED]:~/builds" />
-           </exec>
-           <property name="mac.pushed" value="true" />
+        <exec executable="rsync">
+            <arg value="-aqz" />
+            <arg value="--exclude=.svn"/>
+            <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}"/>
+            <arg 
value="--exclude=${tmp.dir}/${build.name}/lps-{build.version}-src"/>
+            <arg value="--exclude=*.tgz"/>
+            <arg value="${tmp.dir}/${build.name}" />
+            <arg value="[EMAIL PROTECTED]:~/builds" />
+        </exec>
+        <property name="mac.pushed" value="true" />
     </target>
 
-    <target name="kick-off-mac" 
-        if="mac.do" >    
-               <exec executable="ssh" spawn="true">
-                       <arg value="[EMAIL PROTECTED]" />
-                       <arg value="./tiger-builder-go.sh ${build.revision} 
${build.branch} ${build.version} " />
+    <target name="kick-off-mac"
+        if="mac.do" >
+        <exec executable="ssh" spawn="true">
+            <arg value="[EMAIL PROTECTED]" />
+            <arg value="./tiger-builder-go.sh ${build.revision} 
${build.branch} ${build.version} " />
         </exec>
-       </target>    
-    
+    </target>
+
     <target name="report-complete"
         description="Report via all appropriate mechanisms (just email for 
now) on the build's status." >
         <ant target="send-mail-complete" />
     </target>
-    
+
     <target name="send-mail-start"
         if="build.mail.do">
         <tstamp />
-        
-        <mail from="[EMAIL PROTECTED]" 
+
+        <mail from="[EMAIL PROTECTED]"
             tolist="${build.mail.receiver}"
             subject="STARTING nightly build ${build.name} on ${os.name}"
-            mailhost="${build.mail.host}" 
-            messageMimeType="text/plain" 
+            mailhost="${build.mail.host}"
+            messageMimeType="text/plain"
             message="Beginning a build of ${build.name} for ${TODAY}. Working 
directory is on linux-builder, ${tmp.dir}/${build.name}">
         </mail>
 
     </target>
-    
-    <target name="send-mail-complete"  
+
+    <target name="send-mail-complete"
         depends="init"
         if="build.mail.do">
         <tstamp />
-        
-        <mail from="[EMAIL PROTECTED]" 
+
+        <mail from="[EMAIL PROTECTED]"
             tolist="${build.mail.receiver}"
-            mailhost="${build.mail.host}" 
+            mailhost="${build.mail.host}"
             subject="${build.mail.subject}"
             messageMimeType="text/plain">
             <message>${build.mail.message} attaching 
${env.HOME}/logs/tail-${build.revision}-${build.branch-no-dashes}-nightly.log</message>
             <fileset 
file="${env.HOME}/logs/tail-${build.revision}-${build.branch-no-dashes}-nightly.log"
 />
         </mail>
-        
+
     </target>
-    
+
     <target name="push-to-download" if="build.post.do">
         <!-- Push the os-generic versions from the master build machine, 
linux-builder -->
-        <apply executable="scp">            
+        <apply executable="scp">
             <fileset dir="${tmp.dir}/${build.name}/">
                 <include name="*.war" />
                 <include name="*.gz" />
             </fileset>
             <srcfile />
             <arg value="[EMAIL 
PROTECTED]:~/download.openlaszlo.org/nightly/${build.name}" />
-        </apply>        
+        </apply>
     </target>
-    
+
     <target name="push-to-deploy" if="build.deploy.do"
         description="Push the build to labs.openlaszlo.org and deploy it.">
         <echo message="Pushing from ${tmp.dir}/${build.name}/" />
-        <apply executable="scp">            
+        <apply executable="scp">
             <fileset dir="${tmp.dir}/${build.name}/">
                 <include name="*unix.tar.gz" />
             </fileset>
             <srcfile />
             <arg value="[EMAIL 
PROTECTED]:${deploy.destparentdir}/${build.name}-unix.tar.gz" />
-        </apply>        
-        <echo message="Push done." />                
-        <!-- Explode the tarball on deploy host -->        
+        </apply>
+        <echo message="Push done." />
+        <!-- Explode the tarball on deploy host -->
         <exec executable="/usr/bin/ssh">
             <arg value="[EMAIL PROTECTED]" />
-            <arg value="mkdir ${deploy.destdir};" />       
-            <arg value="mv ${deploy.destparentdir}/${build.name}-unix.tar.gz 
${deploy.destdir};" />                   
-            <arg value="gunzip ${deploy.destdir}/${build.name}-unix.tar.gz;" 
/>       
-            <arg value="tar -C ${deploy.destdir} -xf 
${deploy.destdir}/${build.name}-unix.tar" />                        
+            <arg value="mkdir ${deploy.destdir};" />
+            <arg value="mv ${deploy.destparentdir}/${build.name}-unix.tar.gz 
${deploy.destdir};" />
+            <arg value="gunzip ${deploy.destdir}/${build.name}-unix.tar.gz;" />
+            <arg value="tar -C ${deploy.destdir} -xf 
${deploy.destdir}/${build.name}-unix.tar" />
         </exec>
-        
-        <echo message="ssh (exploder) done." />        
+
+        <echo message="ssh (exploder) done." />
     </target>
-    
-    <!-- These targets affect the test servlet. The tomcat server must be 
started for these 
+
+    <!-- These targets affect the test servlet. The tomcat server must be 
started for these
         to be meaningful -->
     <target name="deploy" description="Deploy servlet into tomcat"
             if="build.deploy.do" >
@@ -291,8 +296,8 @@
          username="${tomcat.username}"
          password="${tomcat.password}"
          path="${tomcat.contextpath}"
-         localWar="${tomcat.localwar}" /> 
-    </target>    
+         localWar="${tomcat.localwar}" />
+    </target>
 
     <target name="undeploy" description="Deploy servlet into tomcat"
             if="build.deploy.do" >
@@ -302,6 +307,6 @@
          path="${tomcat.contextpath}"
          />
          <echo message="done undeploying" />
-    </target>    
-    
+    </target>
+
 </project>

Modified: tools/trunk/build-tools/nightly/nightly-go.sh
===================================================================
--- tools/trunk/build-tools/nightly/nightly-go.sh       2007-01-23 17:35:02 UTC 
(rev 3486)
+++ tools/trunk/build-tools/nightly/nightly-go.sh       2007-01-23 18:35:30 UTC 
(rev 3487)
@@ -11,11 +11,11 @@
                           "-Dbuild.branch=${branch}" \
                           "-Dbuild.version=${lpsversion}" \
                           "-Dbuild.name=${buildname}" \
+                          "-Dtomcat.contextpath=${contextpath}" \
                           "$@" >> 
"${BUILDHOME}/logs/${buildnum}-${branchmunge}-nightly.log"
     return $?
 }
 
-# If we want to build doc, we have to use jdk 1.4, NOT 1.5
 [ -n "${JAVA_HOME}" ] || source "${HOME}/.bashrc"
 
 branch=${1:-"trunk"}
@@ -37,17 +37,34 @@
 lpsversion="3.4.x"
 contextpath="/trunk-nightly"
 testtask="lztest"
+if [ ${branchmunge} = "trunk" ] ; then
+       export JAVA_HOME=/home/laszlo/opt/j2sdk1.4.2_10
+       export PATH=$JAVA_HOME/bin:$PATH
+fi 
+if [ ${branchmunge} = "branches-3.4" ] ; then
+        lpsversion="3.4rc1"
+        contextpath="3.4-nightly"
+       export JAVA_HOME=/home/laszlo/opt/j2sdk1.4.2_10
+       export PATH=$JAVA_HOME/bin:$PATH
+        testtask=""
+fi 
 if [ ${branchmunge} = "branches-legals" ] ; then
     lpsversion="4.0.x"
     contextpath="/legals-nightly"
     testtask="megatest"
 fi 
-if [ ${branchmunge} = "branches-legalsb1" ] ; then
-    lpsversion="4.0.0b1"
-    contextpath="/legalsb1-nightly"
+# if [ ${branchmunge} = "branches-4.0b1" ] ; then
+#     lpsversion="4.0b1"
+#    contextpath="/4.0b1-nightly"
+#     testtask="megatest"
+# fi
+if [ ${branchmunge} = "branches-4.0b1" ] ; then
+    lpsversion="4.0b1"
+    contextpath="/lps-4.0b1"
     testtask="megatest"
 fi
 
+
 echo "Using $lpsversion as lpsversion and $contextpath as deployment 
contextpath" 
 
 # Send mail saying we're starting
@@ -66,7 +83,7 @@
 # build it all on this machine. this will include the doc
 call_ant "-Dbuild.target=dist-one" init do-linux-build
 buildreturncode=$?
-if [ "${buildreturncode}" ne 0 ]; then
+if [ "${buildreturncode}" -ne 0 ]; then
    echo "Build ${buildname} failed" >>${BUILDHOME}/logs/nightly-log.txt
 else
    echo "Build ${buildname} succeeded" >>${BUILDHOME}/logs/nightly-log.txt
@@ -83,10 +100,10 @@
 call_ant init megatest
 megatestreturncode=$?
 if [ "${megatestreturncode}" -ne 0 ]; then
-    echo "Megatest failed" >>${BUILDHOME}/logs/nightly-log.txt
+    echo "Megatest failed at"  `date` >>${BUILDHOME}/logs/nightly-log.txt
     megatest=failed
 else
-    echo "Megatest succeeded" >>${BUILDHOME}/logs/nightly-log.txt
+    echo "Megatest succeeded at " `date`  >>${BUILDHOME}/logs/nightly-log.txt
     megatest=succeeded
 fi
 
@@ -95,7 +112,9 @@
     subject="SUCCESS for ${buildnum}-openlaszlo-${branchmunge} on `hostname` 
at `date`"
     msg="SUCCESS for ${buildnum}-openlaszlo-${branchmunge} on `hostname` at 
`date` (Megatest ${megatest})"
     # deploy the build to labs, but only if the build was successful.     
-    call_ant "-Dtomcat.contextpath=${contextpath}" init undeploy 
push-to-deploy deploy
+    call_ant init undeploy 
+    call_ant init push-to-deploy
+    call_ant init deploy
 else
     subject="FAILURE for ${buildnum}-openlaszlo-${branchmunge} on `hostname`"
     msg="FAILURE: build failed (${buildreturncode}) for 
${buildnum}-openlaszlo-${branchmunge} at `date` (Megatest ${megatest})"


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to