You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2006/07/04 05:10:10 UTC

svn commit: r418903 - /jakarta/commons/proper/commons-build/trunk/commons_nightly.sh

Author: psteitz
Date: Mon Jul  3 20:10:10 2006
New Revision: 418903

URL: http://svn.apache.org/viewvc?rev=418903&view=rev
Log:
Initial commit.

Added:
    jakarta/commons/proper/commons-build/trunk/commons_nightly.sh   (with props)

Added: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/commons-build/trunk/commons_nightly.sh?rev=418903&view=auto
==============================================================================
--- jakarta/commons/proper/commons-build/trunk/commons_nightly.sh (added)
+++ jakarta/commons/proper/commons-build/trunk/commons_nightly.sh Mon Jul  3 20:10:10 2006
@@ -0,0 +1,171 @@
+#!/bin/sh
+#==============================================================================
+# Jakarta Commons Nightly Build
+#
+# Executes "svn up" and then "ant clean dist" for all of the
+# components in $nightly_list_location/nightly_proper_ant_list.txt
+# and "maven clean dist" for those in 
+# $nightly_list_location/nightly_proper_maven_list.txt. 
+# Similarly for sandbox components from the *_sandbox_* lists.
+#
+# Uses scp to upload resulting .zip and .tar.gz files to
+# $deploy_user@$deploy_host:$deploy_location/commons-$component
+#
+# Names are munged to take the form 
+# commons-$component-src-$time_stamp (source)
+# commons-$component-$time_stamp (binaries)
+#
+# (Over-)writes a log for each component build to $log_location/$component.log
+#
+# Assumes $proper_root points to a checkout of commons proper trunks
+# and similarly for $sandbox_root
+#==============================================================================
+# Configuration
+#==============================================================================
+# Notes: 1) Path specifications are absolute
+#        2) $deploy_user must have an ssh key on the build host that is
+#           authorized on the $deploy_host
+#==============================================================================
+proper_root="/home/psteitz/trunks-proper"     # local commons proper checkout   
+sandbox_root="/home/psteitz/trunks-sandbox"   # local sandbox checkout
+deploy_host="people.apache.org"               # deployment host
+deploy_user="psteitz"                         # user on the deployment host
+# path to component lists
+nightly_list_location="${proper_root}/commons-build"  
+# deployment path on $deploy_host
+deploy_location="/x1/www/people.apache.org/builds/jakarta-commons/nightly"   
+log_location="/home/psteitz/log"              # where to put logs
+time_stamp=`date +%Y%m%d`                     # time stamp in file names
+ant_build="/home/psteitz/build"               # Ant build directory
+#==============================================================================
+# Process maven components in $components list.
+# Assumes $components are checked out with common root, $current_root
+#==============================================================================
+process_maven_components() {
+  for component in $components
+  do
+    if [ ! -e "${current_root}/${component}" ]  # Check if checkout exists.
+    then
+      echo "$component checkout is missing."; echo
+      continue                # Go ahead anyway
+    fi
+    cd ${current_root}/${component}
+    echo
+    echo "Using Maven to build $component...."
+    svn up
+    maven clean dist > $log_location/$component.log 2>&1 
+    rename "s/m-target/target/" *                       # validator funniness
+    rename "s/SNAPSHOT/$time_stamp/" target/distributions/*
+    rename "s/RC1/$time_stamp/" target/distributions/*  # scxml - branch?
+    scp target/distributions/commons-$component*.gz \
+    $deploy_user@$deploy_host:$deploy_location/commons-$component
+    scp target/distributions/commons-$component*.zip \
+    $deploy_user@$deploy_host:$deploy_location/commons-$component
+    rm -rf target                                       # cleanup validator
+  done 
+} 
+#==============================================================================
+# Process ant components in $components list.
+# Assumes $components are checked out with common root, $current_root
+#==============================================================================
+process_ant_components() {
+  for component in $components
+  do
+    if [ ! -e "${current_root}/${component}" ]  # Check if checkout exists.
+    then
+      echo "$component checkout is missing."; echo
+      continue                # Go ahead anyway
+    fi
+    cd ${current_root}/${component}
+    echo
+    echo "Using Ant to build $component...."
+    svn up
+    ant clean
+
+    # Create source distro
+    rm -rf ${ant_build}/commons-$component-src
+    mkdir ${ant_build}/commons-$component-src
+    cp -R . ${ant_build}/commons-$component-src
+    cd ${ant_build}/commons-$component-src
+    find ${ant_build}/commons-$component-src/ \
+    -name .svn -exec echo rm -rf {} \; > clean.sh
+    sh clean.sh
+    rm clean.sh
+    cd ${ant_build}
+    tar -czf commons-$component-src-$time_stamp.tar.gz commons-$component-src
+    # FIXME (or vmbuild) Ubuntu does not seem to have zip?? Next line fails...
+    zip -q -r commons-$component-src-$time_stamp.zip commons-$component-src
+    mv commons-$component-src-$time_stamp.* ${ant_build}/commons-$component-src
+
+    # Create binary distro
+    cd ${ant_build}/commons-$component-src
+    ant dist > $log_location/$component.log 2>&1 
+    mv dist commons-$component
+    tar -czf commons-${component}-$time_stamp.tar.gz commons-$component
+    # FIXME (or vmbuild) Ubuntu does not seem to have zip??  Next line fails...
+    zip -q -r commons-${component}-$time_stamp.zip commons-$component
+
+    # Upload files
+    scp commons-$component*.gz \
+    $deploy_user@$deploy_host:$deploy_location/commons-$component
+    scp commons-$component*.zip \
+    $deploy_user@$deploy_host:$deploy_location/commons-$component
+
+    # Cleanup
+    rm -f commons-$component*.gz
+    rm -f commons-$component*.zip
+    rm -rf ${ant_build}/commons-$component-src
+  done 
+} 
+
+echo "Commons nightly build starting: `date`"
+
+# Update commons-build
+cd $proper_root/commons-build
+svn up
+
+# Set umask
+umask 002
+
+# Proper Ant components
+list_file="$nightly_list_location/nightly_proper_ant_list.txt"
+components=`<$list_file`
+current_root=$proper_root
+echo "=========================================="
+echo " Building Commons Proper Ant Components   "
+echo "=========================================="
+process_ant_components
+
+# Proper Maven components
+list_file="$nightly_list_location/nightly_proper_maven_list.txt"
+components=`<$list_file`
+current_root=$proper_root
+echo
+echo "=========================================="
+echo " Building Commons Proper Maven Components "
+echo "=========================================="
+process_maven_components
+
+# Sandbox Ant components
+list_file="$nightly_list_location/nightly_sandbox_ant_list.txt"
+components=`<$list_file`
+current_root=$sandbox_root
+echo
+echo "=========================================="
+echo " Building Sandbox Ant Components          "
+echo "=========================================="
+process_ant_components
+
+# Sandbox Maven components
+list_file="$nightly_list_location/nightly_sandbox_maven_list.txt"
+components=`<$list_file`
+current_root=$sandbox_root
+echo
+echo "=========================================="
+echo " Building Sandbox Maven Components        "
+echo "=========================================="
+process_maven_components
+
+exit 0
+
+

Propchange: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org