commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r471652 - /jakarta/commons/proper/commons-build/trunk/commons_nightly.sh
Date Mon, 06 Nov 2006 07:07:57 GMT
Author: bayard
Date: Sun Nov  5 23:07:57 2006
New Revision: 471652

URL: http://svn.apache.org/viewvc?view=rev&rev=471652
Log:
Some minor improvements to the script - mostly because my local username is differnet ot my
apache one and it highlighted some assumptions. Need to pull the configuration into a separate
file as this commit blaps Phil's config with my local one

Modified:
    jakarta/commons/proper/commons-build/trunk/commons_nightly.sh

Modified: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/commons-build/trunk/commons_nightly.sh?view=diff&rev=471652&r1=471651&r2=471652
==============================================================================
--- jakarta/commons/proper/commons-build/trunk/commons_nightly.sh (original)
+++ jakarta/commons/proper/commons-build/trunk/commons_nightly.sh Sun Nov  5 23:07:57 2006
@@ -33,21 +33,23 @@
 #        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
+proper_root="/home/hen/apache/jakarta-commons-proper"     # local commons proper checkout
  
+sandbox_root="/home/hen/apache/jakarta-commons-sandbox"   # local sandbox checkout
 deploy_host="people.apache.org"               # deployment host
-deploy_user="psteitz"                         # user on the deployment host
+deploy_user="bayard"                         # 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
+log_location="/home/hen/apache/jakarta-commons-nightly-logs"              # where to put
logs
+report_location="/home/hen/apache/jakarta-commons-build-report"
 time_stamp=`date +%Y%m%d`                     # time stamp in file names
-ant_build="/home/psteitz/build"               # Ant build directory
-maven_snapshot_host=people.apache.org         # Maven snapshot host
-maven_snapshot_directory=/www/people.apache.org/repo/m1-snapshot-repository
-log_url=http://people.apache.org/~psteitz/commons-nightlies
-notification_email=commons-dev@jakarta.apache.org
+ant_build="/home/hen/apache/jakarta-commons-ant-build"               # Ant build directory
+maven_snapshot_host='people.apache.org'         # Maven snapshot host
+maven_snapshot_user='bayard'
+maven_snapshot_directory='/www/people.apache.org/repo/m1-snapshot-repository'
+log_url='http://people.apache.org/~bayard/commons-nightlies'
+notification_email='commons-dev@.apache.org'
 #==============================================================================
 # Function definitions
 #==============================================================================
@@ -81,7 +83,7 @@
     clean dist > $log_location/$component.log 2>&1 
 
     # Deploy source and binary distro to commons nightly location
-    ssh $deploy_host mkdir -p $deploy_location/commons-$component
+    ssh $deploy_user@$deploy_host mkdir -p $deploy_location/commons-$component
     scp target/distributions/commons-$component*.gz \
     $deploy_user@$deploy_host:$deploy_location/commons-$component
     scp target/distributions/commons-$component*.zip \
@@ -94,7 +96,7 @@
     then 
       echo "Deploying commons-$component SNAPSHOT jar to m1 snapshot repo"
       # Create component directory in the repo if it does not exist
-      ssh $maven_snapshot_host mkdir -p ${maven_snapshot_directory}/commons-$component/jars
+      ssh $maven_snapshot_user@$maven_snapshot_host mkdir -p ${maven_snapshot_directory}/commons-$component/jars
       
       # Create checksum file
       md5sum -b target/commons-$component-$time_stamp.jar > \
@@ -102,18 +104,18 @@
 
       # Upload files
       scp target/commons-$component-$time_stamp.jar \
-      $deploy_user@$maven_snapshot_host:${maven_snapshot_directory}/commons-$component/jars
+      $maven_snapshot_user@$maven_snapshot_host:${maven_snapshot_directory}/commons-$component/jars
       scp target/commons-$component-$time_stamp.jar.md5 \
-      $deploy_user@$maven_snapshot_host:${maven_snapshot_directory}/commons-$component/jars
+      $maven_snapshot_user@$maven_snapshot_host:${maven_snapshot_directory}/commons-$component/jars
 
       # Update -SNAPSHOT symlink to point to latest jar
-      ssh $maven_snapshot_host \
+      ssh $maven_snapshot_user@$maven_snapshot_host \
       "cd ${maven_snapshot_directory}/commons-$component/jars;\
       rm commons-$component-SNAPSHOT.jar;\
       ln -s commons-$component-$time_stamp.jar commons-$component-SNAPSHOT.jar"
 
       # Make files group writable 
-      ssh $maven_snapshot_host chmod -R g+w ${maven_snapshot_directory}/commons-$component
+      ssh $maven_snapshot_user@$maven_snapshot_host chmod -R g+w ${maven_snapshot_directory}/commons-$component
     else # build failed - add to failure list and capture unit test logs
       failed_builds[${#failed_builds[@]}]=$component
       echo "Test Reports" >> $log_location/$component.log
@@ -140,8 +142,8 @@
     svn up
 
     # Create source and binary distributions
-    mvn clean
-    mvn assembly:assembly -DdescriptorId=bin > $log_location/$component.log 2>&1

+    mvn clean > $log_location/$component.log 2>&1
+    mvn assembly:assembly -DdescriptorId=bin >> $log_location/$component.log 2>&1

     mvn assembly:assembly -DdescriptorId=src >> $log_location/$component.log 2>&1

     # Rename files
     mv target/commons-$component*bin.tar.gz target/commons-$component-$time_stamp.tar.gz
@@ -150,7 +152,7 @@
     mv target/commons-$component*src.zip target/commons-$component-$time_stamp-src.zip
 
     # Deploy source and binary distro to commons nightly location
-    ssh $deploy_host mkdir -p $deploy_location/commons-$component
+    ssh $deploy_user@$deploy_host mkdir -p $deploy_location/commons-$component
     scp target/commons-$component*.gz \
     $deploy_user@$deploy_host:$deploy_location/commons-$component
     scp target/commons-$component*.zip \
@@ -187,7 +189,7 @@
     echo
     echo "Using Ant to build $component...."
     svn up
-    ant clean
+    ant clean > $log_location/$component.log 2>&1 
 
     # Create source distro
     rm -rf ${ant_build}/commons-$component-src
@@ -205,7 +207,7 @@
 
     # Create binary distro
     cd ${ant_build}/commons-$component-src
-    ant dist > $log_location/$component.log 2>&1
+    ant dist >> $log_location/$component.log 2>&1
     if [ ! -e dist ] # build failed
     then
       failed_builds[${#failed_builds[@]}]=$component
@@ -216,7 +218,7 @@
     zip -q -r commons-${component}-$time_stamp.zip commons-$component
 
     # Upload files
-    ssh $deploy_host mkdir -p $deploy_location/commons-$component
+    ssh $deploy_user@$deploy_host mkdir -p $deploy_location/commons-$component
     scp commons-$component*.gz \
     $deploy_user@$deploy_host:$deploy_location/commons-$component
     scp commons-$component*.zip \
@@ -238,12 +240,12 @@
 svn up
 
 # Update and install commons m2 poms - drop this when they are released
-cd $proper_root
+cd $proper_root/commons-parent
 svn up pom.xml
-mvn -N install
+##HENmvn -N install > $log_location/commons-parent-m2.log
 cd $sandbox_root
 svn up pom.xml
-mvn -N install
+##HENmvn -N install > $log_location/commons-sandbox-m2.log
 
 # Set umask
 umask 002
@@ -308,24 +310,24 @@
 process_maven2_components
 
 # Make tar/zip files group writable
-ssh $deploy_host chmod -R g+w $deploy_location
+ssh $deploy_user@$deploy_host chmod -R g+w $deploy_location
 
 # Workaround m2 deploy bug - should be able to drop this soon
-ssh $deploy_host "find /www/people.apache.org/repo -perm 644 -user $deploy_user -exec chmod
g+w {} \;"
+ssh $deploy_user@$deploy_host "find /www/people.apache.org/repo -perm 644 -user $deploy_user
-exec chmod g+w {} \;"
 
 # Send failure notification email if there are build failures
 if [ ${#failed_builds[@]} -gt 0 ]
 then
-  rm /home/$deploy_user/build_report
-  echo "Failed build logs:" > /home/$deploy_user/build_report
+  rm ${report_location}
+  echo "Failed build logs:" > ${report_location}
   subject="\"[nightly build] ${failed_builds[@]} failed.\""
   for i in "${failed_builds[@]}"; do
-    echo "${log_url}/${time_stamp}/${i}.log" >> /home/$deploy_user/build_report
+    echo "${log_url}/${time_stamp}/${i}.log" >> ${report_location}
   done
-  scp /home/$deploy_user/build_report $deploy_user@$deploy_host:/home/$deploy_user
-  ssh $deploy_host mail -s $subject $notification_email < /home/$deploy_user/build_report
-  ssh $deploy_host rm /home/$deploy_user/build_report 
-  rm /home/$deploy_user/build_report
+  scp ${report_location} $deploy_user@$deploy_host:/home/$deploy_user
+  ssh $deploy_user@$deploy_host mail -s $subject $notification_email < ${report_location}
+  ssh $deploy_user@$deploy_host rm /home/$deploy_user/build_report 
+  rm ${report_location}
 fi
 
 exit 0



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


Mime
View raw message