forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1085309 - in /forrest/zone/config: crontab.txt run-forrestbot.sh
Date Fri, 25 Mar 2011 10:35:11 GMT
Author: crossley
Date: Fri Mar 25 10:35:11 2011
New Revision: 1085309

URL: http://svn.apache.org/viewvc?rev=1085309&view=rev
Log:
Save the Cocoon logfiles for each run.

Modified:
    forrest/zone/config/crontab.txt
    forrest/zone/config/run-forrestbot.sh

Modified: forrest/zone/config/crontab.txt
URL: http://svn.apache.org/viewvc/forrest/zone/config/crontab.txt?rev=1085309&r1=1085308&r2=1085309&view=diff
==============================================================================
--- forrest/zone/config/crontab.txt (original)
+++ forrest/zone/config/crontab.txt Fri Mar 25 10:35:11 2011
@@ -9,7 +9,7 @@
 10 * * * * /home/forrest/config/run-forrestbot.sh forrest-docs.xml notify trunk
 
 # cleanup old logs
-58 23 * * * find /home/forrest/config/forrestbot-*/logs -name '*.log' -mtime +1 | xargs rm
-f
+58 23 * * * find /home/forrest/config/forrestbot-*/logs -name '*.log' -o -name '*.tar.gz'
-mtime +1 | xargs rm -f
 58 23 * * * cd /home/forrest/config; find . \( -type d ! -name . -prune \) -o \( -name "update-forrest-trunk-*.log"
-mtime +1 -print \) | xargs rm -f
 
 # -- EVERYTHING BELOW THIS LINE HAS BEEN DISABLED, NEED TO CHECK WHEN/IF THESE ENTRIES CAN
BE REMOVED --

Modified: forrest/zone/config/run-forrestbot.sh
URL: http://svn.apache.org/viewvc/forrest/zone/config/run-forrestbot.sh?rev=1085309&r1=1085308&r2=1085309&view=diff
==============================================================================
--- forrest/zone/config/run-forrestbot.sh (original)
+++ forrest/zone/config/run-forrestbot.sh Fri Mar 25 10:35:11 2011
@@ -27,6 +27,8 @@
 # See copy in SVN at zone/config/crontab.txt
 
 fbVersion=$3
+timestamp=`date "+%Y%m%d%H%M"`
+
 case $fbVersion in
   "trunk" )
     fbWorkspace="ft"
@@ -83,6 +85,12 @@ esac
 cd $DOC_ROOT/$fbWorkspace
 #   forrest -Dforrest.jvmargs=-Djava.awt.headless=true -f $1 $2 > /dev/null 2>&1
 forrest -Dforrest.jvmargs=-Djava.awt.headless=true -f $1 $2 >> $cron_logfile 2>&1
+if [ ${?} -eq 0 ]; then
+ success=1 
+else
+ success=0 
+fi
+echo "success=${success}" >> $cron_logfile
 
 # do some followup for certain sites
 case $site in
@@ -90,6 +98,16 @@ case $site in
     cd $DOC_ROOT/$fbWorkspace/build && tar cf cocoon-docs.tar $site && gzip
-f cocoon-docs.tar
     ;;
 
+  "forrest-seed" )
+    tarFile="${FORRESTBOT_HOME}/logs/${site}-cocoon-log-${timestamp}.tar"
+    cd ${FORRESTBOT_HOME}/conf/work && tar cf ${tarFile} ${site}/webapp/WEB-INF/logs
&& gzip -f ${tarFile}
+    ;;
+
+  "forrest-sample-2" )
+    tarFile="${FORRESTBOT_HOME}/logs/${site}-cocoon-log-${timestamp}.tar"
+    cd ${FORRESTBOT_HOME}/conf/work && tar cf ${tarFile} ${site}/webapp/WEB-INF/logs
&& gzip -f ${tarFile}
+    ;;
+
   * )
     ;;
 esac



Mime
View raw message