You are viewing a plain text version of this content. The canonical link for it is here.
Posted to alexandria-dev@jakarta.apache.org by Nick Chalko <ni...@chalko.com> on 2002/12/27 18:43:28 UTC

Cron script

Sam,

Now that I have http://chalko.com/gump is working, I want to automate it.
Is your the cron script that you use somewehre I can take a look at it? 
  If not can you post it here?

Getting the latest and dated builds right can be a pain.

R,
Nick


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Cron script

Posted by Sam Ruby <ru...@apache.org>.
Nick Chalko wrote:
> 
> A couple of questions.  What is the <XMP> tag for.

XMP is just like PRE, with the exception that the content may include 
"<" and ">" signs.  Deprecated, discouraged, but still works.

> nag.pl  refers to  dated runs of gump.
> 
> I am also interested in how you manage your "dated" runs.

I build on my machine, upload the gump-log, and then post it on 
cvs.apache.org.  Here's the relevant portion of the perl script that 
runs on cvs.apache.org:

   ($sec,$min,$hour,$mday,$mon,$year) = localtime;
   $date=sprintf("%d-%2.2d-%2.2d", $year+1900, $mon+1, $mday);

   chdir "/www/cvs.apache.org/builds/gump";
   rmtree $date, 1, 1 if -d $date;
   mkdir "$date", 0775;
   system "unzip -q -j -d $date /home/rubys/staging/gump-log.zip";
   unlink "latest";
   symlink "$date", "latest";
   unlink "/home/rubys/staging/gump-log.zip";

   $count=0;
   foreach (reverse sort <20??-*>) {
     next if $count++<7
     system "tar czf Attic/$_.tar.gz $_";
     rmtree $_, 1, 1;
   }

- Sam Ruby




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Cron script

Posted by Nick Chalko <ni...@chalko.com>.
Sam Ruby wrote:

> Nick Chalko wrote:
>
>> Sam,
>>
>> Now that I have http://chalko.com/gump is working, I want to automate 
>> it.
>> Is your the cron script that you use somewehre I can take a look at 
>> it?  If not can you post it here?
>

>
> Each varies slightly, but here's a typical one.  I've also attached 
> the source to timeout.. a very handy utility.

Thank's
The script is very helpfull.

A couple of questions.  
What is the <XMP> tag for.

nag.pl  refers to  dated runs of gump.

I am also interested in how you manage your "dated" runs.

R,
Nick




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Cron script

Posted by Sam Ruby <ru...@apache.org>.
Nick Chalko wrote:
> Sam,
> 
> Now that I have http://chalko.com/gump is working, I want to automate it.
> Is your the cron script that you use somewehre I can take a look at it? 
>  If not can you post it here?

Each varies slightly, but here's a typical one.  I've also attached the 
source to timeout.. a very handy utility.

export JAVA_HOME=/usr/j2sdk1.4.1_01
export PATH=/data/gump/bin:$JAVA_HOME/bin:/usr/local/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib/tools.jar
export CVS_RSH=`which ssh`
export LOG=/data/gump/log/gen.html
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

umask 002

echo \<XMP\> > $LOG
cd /home/rubys/gump
if ! /home/rubys/bin/timeout 1200 cvs update >> $LOG; then
sleep 90
echo Retrying... >> $LOG
/home/rubys/bin/timeout 1200 cvs update >> $LOG
fi
rm .timestamp
bash gen.sh -cp "/home/rubys/bin/timeout 1200" 2>&1 >> $LOG
echo >> $LOG
bash work/build.sh gump clean >> $LOG
echo >> $LOG
export >> $LOG
echo \</XMP\> >> $LOG

# /usr/X11R6/bin/Xvfb :8 &
# export DISPLAY=:8

cd /data/gump
bash update.sh all
rm /data/gump/jars/latest
bash build.sh all
pkill -P $$

> Getting the latest and dated builds right can be a pain.

it is about as easy as cvs update...

- Sam Ruby