#==============================================================================
# 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 [EMAIL PROTECTED] mkdir -p $deploy_location/commons-$component
scp target/distributions/commons-$component*.gz \
[EMAIL PROTECTED]:$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 [EMAIL PROTECTED] 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 \
- [EMAIL PROTECTED]:${maven_snapshot_directory}/commons-$component/jars
+ [EMAIL PROTECTED]:${maven_snapshot_directory}/commons-$component/jars
scp target/commons-$component-$time_stamp.jar.md5 \
- [EMAIL PROTECTED]:${maven_snapshot_directory}/commons-$component/jars
+ [EMAIL PROTECTED]:${maven_snapshot_directory}/commons-$component/jars
# Update -SNAPSHOT symlink to point to latest jar
- ssh $maven_snapshot_host \
+ ssh [EMAIL PROTECTED] \
"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 [EMAIL PROTECTED] chmod -R g+w
${maven_snapshot_directory}/commons-$component
else # build failed - add to failure list and capture unit test logs
[EMAIL PROTECTED]
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 [EMAIL PROTECTED] mkdir -p $deploy_location/commons-$component
scp target/commons-$component*.gz \
[EMAIL PROTECTED]:$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
[EMAIL PROTECTED]
@@ -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 [EMAIL PROTECTED] mkdir -p $deploy_location/commons-$component
scp commons-$component*.gz \
[EMAIL PROTECTED]:$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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] "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 [ [EMAIL PROTECTED] -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] [EMAIL PROTECTED] failed.\""
for i in "[EMAIL PROTECTED]"; 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 [EMAIL PROTECTED]:/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} [EMAIL PROTECTED]:/home/$deploy_user
+ ssh [EMAIL PROTECTED] mail -s $subject $notification_email <
${report_location}
+ ssh [EMAIL PROTECTED] rm /home/$deploy_user/build_report
+ rm ${report_location}
fi
exit 0
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]