You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ni...@apache.org on 2007/12/18 03:08:54 UTC
svn commit: r605064 - in /lucene/hadoop/nightly: hudsonBuildHadoopNightly.sh
hudsonBuildHadoopPatch.sh processHadoopPatchEmail.sh
Author: nigel
Date: Mon Dec 17 18:08:33 2007
New Revision: 605064
URL: http://svn.apache.org/viewvc?rev=605064&view=rev
Log:
add and update hudson scripts for Hadoop patch and nightly builds
Added:
lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh (with props)
Modified:
lucene/hadoop/nightly/hudsonBuildHadoopPatch.sh
lucene/hadoop/nightly/processHadoopPatchEmail.sh
Added: lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh?rev=605064&view=auto
==============================================================================
--- lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh (added)
+++ lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh Mon Dec 17 18:08:33 2007
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#set -x
+
+### BUILD_ID is set by Hudson
+baseDir=/export/home/hudson/hudson/jobs/Hadoop-Nightly
+trunk=$baseDir/workspace/trunk
+
+cd $trunk
+
+### tar target is included in findbugs target
+### run this first before instrumenting classes
+$ANT_HOME/bin/ant -Dversion=$BUILD_ID -Dfindbugs.home=$HUDSON_HOME/../tools/findbugs/latest clean docs findbugs
+RESULT=$?
+if [ $RESULT != 0 ] ; then
+ echo "Build Failed: remaining tests not run"
+ exit $RESULT
+fi
+mv build/*.tar.gz $trunk
+mv build/test/findbugs $trunk
+mv build/docs/api $trunk
+
+### clean workspace
+$ANT_HOME/bin/ant clean
+
+### Copy in any supporting jar files needed by this process
+cp -r $baseDir/lib/* ./lib
+
+### run checkstyle and tests with clover
+$ANT_HOME/bin/ant -Dversion=$BUILD_ID -Drun.clover=true -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes checkstyle create-c++-configure test generate-clover-reports
+
Propchange: lucene/hadoop/nightly/hudsonBuildHadoopNightly.sh
------------------------------------------------------------------------------
svn:executable = *
Modified: lucene/hadoop/nightly/hudsonBuildHadoopPatch.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/nightly/hudsonBuildHadoopPatch.sh?rev=605064&r1=605063&r2=605064&view=diff
==============================================================================
--- lucene/hadoop/nightly/hudsonBuildHadoopPatch.sh (original)
+++ lucene/hadoop/nightly/hudsonBuildHadoopPatch.sh Mon Dec 17 18:08:33 2007
@@ -2,7 +2,7 @@
#set -x
-### Setup global variables. BUILD_ID is set by Hudson
+### Setup some variables. BUILD_ID is set by Hudson
baseDir=/export/home/hudson/hudson/jobs/Hadoop-Patch
GREP=/usr/local/bin/grep
WGET=/usr/sfw/bin/wget
@@ -10,23 +10,6 @@
PS=/usr/ucb/ps
JIRA=/export/home/hudson/tools/jira_cli/src/cli/jira
FINDBUGS_HOME=/export/home/hudson/tools/findbugs/latest
-patchNum=""
-revisionNum=""
-JIRA_COMMENT=""
-JIRA_COMMENT_FOOTER="Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/$BUILD_NUMBER/console
-
-This message is automatically generated."
-
-### Retrieve the defect number
-if [ ! -e $baseDir/current/defectNum ] ; then
- echo "Could not determine the patch to test. Exiting."
- cleanupAndExit 0
-fi
-defect=`cat $baseDir/current/defectNum`
-if [ -z "$defect" ] ; then
- echo "Could not determine the patch to test. Exiting."
- cleanupAndExit 0
-fi
###############################################################################
setup () {
@@ -237,6 +220,12 @@
echo ""
echo ""
$ANT_HOME/bin/ant -Dversion=${revisionNum}_${defect}_PATCH-${patchNum} -Dfindbugs.home=$FINDBUGS_HOME -DHadoopPatchProcess= findbugs
+ if [ $? != 0 ] ; then
+ JIRA_COMMENT="$JIRA_COMMENT
+
+ findbugs -1. The patch appears to cause Findbugs to fail."
+ return 1
+ fi
JIRA_COMMENT_FOOTER="Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/$BUILD_NUMBER/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
$JIRA_COMMENT_FOOTER"
cp $baseDir/workspace/trunk/build/test/findbugs/*.xml $baseDir/current/patchFindbugsWarnings.xml
@@ -281,7 +270,7 @@
### Kill any rogue build processes from the last attempt
$PS -auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null
- $ANT_HOME/bin/ant -Dversion=${revisionNum}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes tar test-core
+ $ANT_HOME/bin/ant -Dversion=${revisionNum}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes create-c++-configure tar test-core
if [[ $? != 0 ]] ; then
JIRA_COMMENT="$JIRA_COMMENT
@@ -348,8 +337,9 @@
### Update Jira with a comment
export USER=hudson
-# $JIRA -s issues.apache.org/jira login hadoopqa `cat ~/private/hadoopqaJiraPassword`
-# $JIRA -s issues.apache.org/jira comment $defect "$comment"
+ $JIRA -s issues.apache.org/jira login hadoopqa `cat ~/private/hadoopqaJiraPassword`
+ $JIRA -s issues.apache.org/jira comment $defect "$comment"
+ $JIRA -s issues.apache.org/jira logout
}
###############################################################################
@@ -361,7 +351,7 @@
rm -rf $baseDir/$defect
fi
fi
- if [ -e $baseDir/current ] ; then
+ if [ -h $baseDir/current ] ; then
rm -f $baseDir/current
fi
echo ""
@@ -379,6 +369,24 @@
###############################################################################
###############################################################################
###############################################################################
+
+export patchNum=""
+export revisionNum=""
+export JIRA_COMMENT=""
+export JIRA_COMMENT_FOOTER="Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/$BUILD_NUMBER/console
+
+This message is automatically generated."
+
+### Retrieve the defect number
+if [ ! -e $baseDir/current/defectNum ] ; then
+ echo "Could not determine the patch to test. Exiting."
+ cleanupAndExit 0
+fi
+export defect=`cat $baseDir/current/defectNum`
+if [ -z "$defect" ] ; then
+ echo "Could not determine the patch to test. Exiting."
+ cleanupAndExit 0
+fi
setup
checkAuthor
Modified: lucene/hadoop/nightly/processHadoopPatchEmail.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/nightly/processHadoopPatchEmail.sh?rev=605064&r1=605063&r2=605064&view=diff
==============================================================================
--- lucene/hadoop/nightly/processHadoopPatchEmail.sh (original)
+++ lucene/hadoop/nightly/processHadoopPatchEmail.sh Mon Dec 17 18:08:33 2007
@@ -53,7 +53,7 @@
### Start build. The 'token' is a secret.
echo "$defect patch submitted for testing at `date`" >> $LOG
- token=`cat ~/private/hudsonBuildToken`
+ token=`cat ~hudson/private/hudsonBuildToken`
/usr/sfw/bin/wget -q -O $baseDir/$defect/build http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/build?token=$token
chmod -R g+w $baseDir/$defect
fi