You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by db...@apache.org on 2005/07/27 08:00:16 UTC
svn commit: r225460 - /geronimo/scripts/build_and_complain.sh
Author: dblevins
Date: Tue Jul 26 23:00:15 2005
New Revision: 225460
URL: http://svn.apache.org/viewcvs?rev=225460&view=rev
Log:
- Reworked to use m:checkout
- Uses sendmail instead of mutt, so now reply-to is dev@geronimo.apache.org
- Can also specify the svn url so as to be useful for building/testing the QA and other branches
Modified:
geronimo/scripts/build_and_complain.sh
Modified: geronimo/scripts/build_and_complain.sh
URL: http://svn.apache.org/viewcvs/geronimo/scripts/build_and_complain.sh?rev=225460&r1=225459&r2=225460&view=diff
==============================================================================
--- geronimo/scripts/build_and_complain.sh (original)
+++ geronimo/scripts/build_and_complain.sh Tue Jul 26 23:00:15 2005
@@ -38,22 +38,35 @@
# directory on people.apache.org. If your keys aren't setup, this
# won't work so well.
#
-# Email messages are send with mutt, which could be improved to be
-# something usually installed on a typical machine.
-#
-# The email address for nagging emails can be a parameter
############################################################
#
# Parameters
#
############################################################
-
+
+function usage {
+ echo "$(basename $0) [-u user] [-s svn_url] [email_address]"
+}
+
+# The default svn url
+SCM_URL="http://svn.apache.org/repos/asf/geronimo/trunk"
+
+while getopts "s:u:" option; do
+ case $option in
+ u ) USER=$OPTARG;;
+ s ) SCM_URL=$OPTARG;;
+ \? ) usage; exit 1;;
+ * ) usage; exit 1;;
+ esac
+done
+shift $(($OPTIND -1))
+
# The email address to complain to
SCM_LIST=${1:-scm@geronimo.apache.org}
-# The list of modules we will build
-MODULES=$(ls geronimo/{applications,specs,plugins,modules}/*/project.xml openejb/modules/*/project.xml tranql{,-connector}/project.xml | tr '\n' ',')
+echo "build: $SCM_URL"
+echo "notify: $SCM_LIST"
############################################################
#
@@ -62,16 +75,6 @@
############################################################
#----
-# Checkout the projects needed if not already checked out
-#
-function setup {
- [ ! -d geronimo ] && svn co http://svn.apache.org/repos/asf/geronimo/trunk geronimo
- [ ! -d openejb ] && cvs -d:pserver:anon@cvs.openejb.org:/scm/openejb co openejb
- [ ! -d tranql ] && cvs -d:pserver:anon@cvs.tranql.codehaus.org:/scm/tranql co tranql
- [ ! -d tranql-connector ] && cvs -d:pserver:anon@cvs.tranql.codehaus.org:/scm/tranql co -d tranql-connector connector
-}
-
-#----
# Don't kill the build on failing tests. Run it all the
# way through and report all the failing tests at the end.
#
@@ -113,15 +116,24 @@
maven --info > /tmp/$BUILD_ID/maven-info.txt
uname -a > /tmp/$BUILD_ID/system-info.txt
+ echo "http://people.apache.org/~$USER/$BUILD_ID"
scp -C -r /tmp/$BUILD_ID people.apache.org:public_html/
# Everything from EOF ...(many lines)... EOF is the email,
# so if you want to change the output, this is where.
### begin email output ###
- mutt -xs "build failed $(date)" $TO <<EOF
+ssh people.apache.org /usr/sbin/sendmail -it <<EOF
+From: $USER@apache.org
+To: $TO
+Reply-To: dev@geronimo.apache.org
+Subject: build failed $(date)"
+
BUILD FAILED
+ $SCM_URL
+ $(grep 'Checked out revision' $LOG | sed 's/Checked out r/R/' )
+
See details at:
http://people.apache.org/~$USER/$BUILD_ID
@@ -151,30 +163,20 @@
#
############################################################
-
-# run the setup function
-setup
-
-# do a clean of the build directories
-maven -o -Dmaven.multiproject.includes=$MODULES -Dgoal=clean multiproject:goal
+# scrape 'trunk' off the url and return the last
+# directory name in the url.
+DIR=$(basename ${SCM_URL//\/trunk/})
# make up a somewhat unique build id
-BUILD_ID=build-$(date +%Y%m%d-%H%M)
-
-# update all the source code
-{
- echo "Updating code"
- (cd geronimo && svn update) &&
- (cd openejb && cvs -q up -dP) &&
- (cd tranql && cvs -q up -dP) &&
- (cd tranql-connector && cvs -q up -dP)
-} 2>&1 | tee scm-log.txt
+BUILD_ID=$DIR-$(date +%Y%m%d-%H%M)
# run the build
LOG=$BUILD_ID-output.txt
{
- echo "Building $MODULES"
- xmaven -Dmaven.multiproject.includes=$MODULES -Dgoal=default multiproject:goal
+ echo "\$ svn co $SCM_URL $DIR"
+ svn co $SCM_URL $DIR &&
+ echo "\$ maven m:checkout clean default" &&
+ (cd $DIR && xmaven m:checkout clean default)
} 2>&1 | tee $LOG
# check the log file and complain if needed
@@ -182,6 +184,3 @@
# kill our log file
rm $LOG
-
-
-