I have committed a first cut that doesn't do much for now because the
final piece is missing, but I want to explain it anyway 8-)

All sites to which we may publish any information are defined in
server documents in the server directory.  There is one document per
physical server, each server can define multiple sites.

The site itself has a Gump-unique name, a description (not used) a
document root and a groupid.  I expect to use the last one for chgrp
calls in the script that actually delivers the nightly builds on the
remote machine.

In you workspace definition, you define to which sites you really want
to send stuff to.  This happens in a deliver element that looks like
this on my machine

  <deliver>
    <server name="icarus.apache.org" username="bodewig" 
            dropdir="/x1/home/bodewig">
      <site name="stefans-test" />
    </server>
  </deliver>

deliver has an optional scratchdir attribute that defaults to "basedir
of workspace"/scratch - this is where the packages for the sites will
be assembled.

username is the username to use when scp'ing the packages to the
server and when ssh'ing the remote script.  dropdir (default is /tmp)
is the location we send the packages to before they get expanded.

site is here again so that I can say I want to deliver stuff to
jakarta but not to xml (because I'm not a member of group xml for
example).

Finally, in you project definition you put something like

    <deliver fromdir="distribution/src" tosite="stefans-test"
             todir="ant/nightly/@@DATE@@/" />

this declares that everything from distribution/src should go to the
site stefans-test into a directory named ant/nightly/@@DATE@@/ under
the site's document root.

Now to the implementation:

I still haven't read anything about XSLT and thus made it as easy as I
could for now.  For all sites that are defined in the workspace, I'll
get top level elements like this

<site dropdir="/x1/home/bodewig" name="stefans-test" 
      scratchdir="/home/bodewig/dev/gump/scratch" 
      server="icarus.apache.org" username="bodewig">
  <description>Testsite for Stefan</description>
  <docroot>/x1/home/bodewig/public_html/gump</docroot>
  <groupid>jakarta</groupid>
  <deliver fromdir="/home/bodewig/dev/gump/jakarta-ant/distribution/src"
           todir="ant/nightly/20020304/"
           tosite="stefans-test"/>
</site>

which should be rather easy to translate into two shell scripts.

I've done most stuff in Java by moving elements around and put them
directly under workspace.  I expect to change that to an XSL based
process that creates an intermediate deliver.xml much like build and
update do today, but I need to lose my fear first 8-)

My next step is an XSL sheet that takes this input and produces a
local and a remote shell script from this information.

Any feedback - much more on how the data is defined than on the
implementation - is very much appreciated.

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to