Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 9905 invoked from network); 23 Oct 2008 17:16:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2008 17:16:36 -0000 Received: (qmail 81069 invoked by uid 500); 23 Oct 2008 17:16:38 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 81006 invoked by uid 500); 23 Oct 2008 17:16:38 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 80989 invoked by uid 99); 23 Oct 2008 17:16:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2008 10:16:37 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jaw981@gmail.com designates 209.85.134.191 as permitted sender) Received: from [209.85.134.191] (HELO mu-out-0910.google.com) (209.85.134.191) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Oct 2008 17:15:25 +0000 Received: by mu-out-0910.google.com with SMTP id i10so255957mue.5 for ; Thu, 23 Oct 2008 10:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=dSN/M0Efum6M1+fgTvQvc27DhhBwwxJpk1nMwiL3Vco=; b=xbS5DtPkRCFll1+K/gHB+KnJLEmjnWXWWS/4BuRieVeMdPYhVNoYGgp9Qaw53UZb5/ ClYXI9QsMzXUA3kYqSHs3cbc02g/s96i9pbZtjqaMXch1/HY5BwIeYw75jdb0OsbJqx1 swEN6f4vz0QiysbfY79ECwHc21IgqmOSjysT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=xLY3RHEF2LlDjoeZPgYH4b7HX5YB/ytJ6D7tKRWcPolUSCqcvHZJ5+BvEx6CUGe8a5 h4R5d1XjVDqh5SLmvERlBjiJiUpTdIdBerQi2S37DMblUa6JRLxUvW/xycwmVn8EIEG8 fnG0MB/PRscfER8+jUNlObGH9sKlQIWrtk+s4= Received: by 10.151.11.17 with SMTP id o17mr4078688ybi.63.1224778066315; Thu, 23 Oct 2008 09:07:46 -0700 (PDT) Received: by 10.150.195.19 with HTTP; Thu, 23 Oct 2008 09:07:46 -0700 (PDT) Message-ID: <73a75e430810230907l332f53a5n88e278644f3bf065@mail.gmail.com> Date: Thu, 23 Oct 2008 12:07:46 -0400 From: "Jason Warner" To: dev@geronimo.apache.org Subject: Re: Continuous TCK Testing In-Reply-To: <7EB28779-8BBC-4018-B118-1D2A172E3382@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28163_31674386.1224778066278" References: <48D2D8C8.7020504@gmail.com> <2B643CBC-C567-43FB-B30D-92F0A2D39672@gmail.com> <73a75e430810010920l17659e4fv20c7f4893a49d019@mail.gmail.com> <7EB28779-8BBC-4018-B118-1D2A172E3382@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28163_31674386.1224778066278 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Jason, Now that I've got my hands on anthill to play with, I'm diving into setting up things. I was hoping you'd be able to clarify for me a little bit how the build-support stuff was integrated with the anthill stuff. Specifically, I'm working on setting up a project in anthill to build the geronimo server from the trunk in the repository. This seems like a good first step to me. From what you specified in your explanation, it seems that every step of this automated testing had an anthill project and a corresponding groovy-based controller. So for the geronimo build, I would have an anthill project devoted to building the server which would help with shuffling artifacts around, cleaning working directories, and other such pre/post build things, but the actual build would be handled by the controller? So the anthill project would actually be launching the controller rather than the build? Thanks! On Thu, Oct 2, 2008 at 2:34 PM, Jason Dillon wrote: > On Oct 1, 2008, at 11:20 PM, Jason Warner wrote: > > Is the GBuild stuff in svn the same as the anthill-based code or is that >> something different? GBuild seems to have scripts for running tck and that >> leads me to think they're the same thing, but I see no mention of anthill in >> the code. >> > > The Anthill stuff is completely different than the GBuild stuff. I started > out trying to get the TCK automated using GBuild, but decided that the > system lacked too many features to perform as I desired, and went ahead with > Anthill as it did pretty much everything, though had some stability > problems. > > One of the main reasons why I choose Anthill (AHP, Anthill Pro that is) was > its build agent and code repository systems. This allowed me to ensure that > each build used exactly the desired artifacts. Another was the configurable > workflow, which allowed me to create a custom chain of events to handle > running builds on remote agents and control what data gets set to them, what > it will collect and what logic to execute once all distributed work has been > completed for a particular build. And the kicker which help facilitate > bringing it all together was its concept of a build life. > > At the time I could find *no other* build tool which could meet all of > these needs, and so I went with AHP instead of spending months > building/testing features in GBuild. > > While AHP supports configuring a lot of stuff via its web-interface, I > found that it was very cumbersome, so I opted to write some glue, which was > stored in svn here: > > > https://svn.apache.org/viewvc/geronimo/sandbox/build-support/?pathrev=632245 > > Its been a while, so I have to refresh my memory on how this stuff actually > worked. First let me explain about the code repository (what it calls > codestation) and why it was critical to the TCK testing IMO. When we use > Maven normally, it pulls data from a set of external repositories, picks up > more repositories from the stuff it downloads and quickly we loose control > where stuff comes from. After it pulls down all that stuff, it churns > though a build and spits out the stuff we care about, normally stuffing them > (via mvn install) into the local repository. > > AHP supports by default tasks to publish artifacts (really just a set of > files controlled by an Ant-like include/exclude path) from a build agent > into Codestation, as well as tasks to resolve artifacts (ie. download them > from Codestation to the local working directory on the build agents system). > Each top-level build in AHP gets assigned a new (empty) build life. > Artifacts are always published to/resolved from a build life, either that > of the current build, or of a dependency build. > > So what I did was I setup builds for Geronimo Server (the normal > server/trunk stuff), which did the normal mvn install thingy, but I always > gave it a custom -Dmaven.local.repository which resolved to something inside > the working directory for the running build. The build was still online, so > it pulled down a bunch of stuff into an empty local repository (so it was a > clean build wrt the repository, as well as the source code, which was always > fetched for each new build). Once the build had finished, I used the > artifact publisher task to push *all* of the stuff in the local repository > into Codestation, labled as something like "Maven repository artifacts" for > the current build life. > > Then I setup another build for Apache Geronimo CTS Server (the > porting/branches/* stuff). This build was dependent upon the "Maven > repository artifacts" of the Geronimo Server build, and I configured those > artifacts to get installed on the build agents system in the same directory > that I configured the CTS Server build to use for its local maven > repository. So again the repo started out empty, then got populated with > all of the outputs from the normal G build, and then the cts-server build > was started. The build of the components and assemblies is normally fairly > quick and aside from some stuff in the private tck repo won't download muck > more stuff, because it already had most of its dependencies installed via > the Codestation dependency resolution. Once the build finished, I > published to cts-server assembly artifacts back to Codestation under like > "CTS Server Assemblies" or something. > > Up until this point its normal builds, but now we have built the G server, > then built the CTS server (using the *exact* artifacts from the G server > build, even though each might have happened on a different build agent). > And now we need to go and run a bunch of tests, using the *exact* CTS > server assemblies, produce some output, collect it, and once all of the > tests are done render some nice reports, etc. > > AHP supports setting up builds which contain "parallel" tasks, each of > those tasks is then performed by a build agent, they have fancy build agent > selection stuff, but for my needs I had basically 2 groups, one group for > running the server builds, and then another for running the tests. I only > set aside like 2 agents for builds and the rest for tests. Oh, I forgot to > mention that I had 2 16x 16g AMD beasts all running CentOS 5, each with > about 10-12 Xen virtual machines running internally to run build agents. > Each system also had a RAID-0 array setup over 4 disks to help reduce disk > io wait, which was as I found out the limiting factor when trying to run a > ton of builds that all checkout and download artifacts and such. > > I helped the AHP team add a new feature which was an parallel iterator > task, so you define *one* task that internally fires off n parallel tasks, > which would set the iteration number, and leave it up to the build logic to > pick what to do based on that index. The alternative was a unwieldy set of > like 200 tasks in their UI which simply didn't work at all. You might have > notice an "iterations.xml" file in the tck-testsuite directory, this was was > was used to take an iteration number and turn it into what tests we actually > run. The bits are order sensitive in that file. > > Soooo, after we have a CTS Server for a particular G Server build, we can > no go an do "runtests" for a specific set of tests (defined by an > iteration)... this differed from the other builds above a little, but still > pulled down artifacts, the CTS Server assemblies (only the assemblies and > the required bits to run the geronimo-maven-plugin, which was used to > geronimo:install, as well as used by the tck itself to fire up the server > and so on). The key thing here, with regards to the maven configuration > (besides using that custom Codestation populated repository) was that the > builds were run *offline*. > > After runtests completed, the results are then soaked up (the stuff that > javatest pukes out with icky details, as well as the full log files and > other stuff I can recall) and then pushed back into Codestation. > > Once all of the iterations were finished, another task fires off which > generates a report. It does this by downloading from Codestation all of the > runtests outputs (each was zipped I think), unzips them one by one, run some > custom goo I wrote (based some of the concepts from original stuff from the > GBuild-based TCK automation), and generates a nice Javadoc-like report that > includes all of the gory details. > > I can't remember how long I spent working on this... too long (not the > reports I mean, the whole system). But in the end I recall something like > running an entire TCK testsuite for a single server configuration (like > jetty) in about 4-6 hours... I sent mail to the list with the results, so if > you are curious what the real number is, instead of my guess, you can look > for it there. But anyway it was damn quick running on just those 2 > machines. And I *knew* exactly that each of the distributed tests was > actually testing a known build that I could trace back to its artifacts and > then back to its SVN revision, without worrying about mvn downloading > something new when midnight rolled over or that a new G server or CTS server > build that might be in progress hasn't compromised the testing by polluting > the local repository. > > * * * > > So, about the sandbox/build-support stuff... > > First there is the 'harness' project, which is rather small, but contains > the basic stuff, like a version of ant and maven which all of these builds > would use, some other internal glue, a fix for an evil Maven problem > causing erroneous build failures due to some internal thread state > corruption or gremlins, not sure which. I kinda used this project to help > manage the software needed by normal builds, which is why Ant and Maven were > in there... ie. so I didn't have to go install it on each agent each time it > changed, just let the AHP system deal with it for me. > > This was setup as a normal AHP project, built using its internal Ant > builder (though having that builder configured still to use the local > version it pulled from SVN to ensure it always works. > > Each other build was setup to depend on the output artifacts from the build > harness build, using the latest in a range, like say using "3.*" for the > latest 3.x build (which looks like that was 3.7). This let me work on new > stuff w/o breaking the current builds as I hacked things up. > > So, in addition to all of the stuff I mentioned above wrt the G and CTS > builds, each also had this step which resolved the build harness artifacts > to that working directory, and the Maven builds were always run via the > version of Maven included from the harness. But, AHP didn't actually run > that version of Maven directly, it used its internal Ant task to execute the > version of Ant from the harness *and* use the harness.xml buildfile. > > The harness.xml stuff is some more goo which I wrote to help mange AHP > configurations. With AHP (at that time, not sure if it has changed) you had > to do most everything via the web UI, which sucked, and it was hard to > refactor sets of projects and so on. So I came up with a standard set of > tasks to execute for a project, then put all of the custom muck I needed > into what I called a _library_ and then had the AHP via harness.xml invoke > it with some configuration about what project it was and other build > details. > > The actual harness.xml is not very big, it simply makes sure that */bin/* > is executable (codestation couldn't preserve execute bits), uses the > Codestation command-line client (invoking the javaclass directly though) to > ask the repository to resolve artifacts from the "Build Library" to the > local repository. I had this artifact resolution separate from the normal > dependency (or harness) artifact resolution so that it was easier for me to > fix problems with the library while a huge set of TCK iterations were still > queued up to run. Basically, if I noticed a problem due to a code or > configuration issue in an early build, I could fix it, and use the existing > builds to verify the fix, instead of wasting an hour (sometimes more > depending on networking problems accessing remote repos while building the > servers) to rebuild and start over. > > This brings us to the 'libraries' project. In general the idea of a > _library_ was just a named/versioned collection of files, where you could be > used by a project. The main (er only) library defined in this SVN is > system/. This is the groovy glue which made everything work. This is where > the entry-point class is located (the guy who gets invoked via harness.xml > via: > > > > > > > > gbuild.system.BuildHarness.bootstrap(this) > > > > I won't go into too much detail on this stuff now, take a look at it and > ask questions. But, basically there is stuff in gbuild.system.* which is > harness support muck, and stuff in gbuild.config.* which contains > configuration. I was kinda mid-refactoring of some things, starting to add > new features, not sure where I left off actually. But the key bits are in > gbuild.config.project.* This contains a package for each project, with the > package name being the same as the AHP project (with " " -> "_"). And then > in each of those package is at least a Controller.groovy class (or other > classes if special muck was needed, like for the report generation in > Geronimo_CTS, etc). > > The controller defines a set of actions, implemented as Groovy closures > bound to properties of the Controller class. One of the properties passed > in from the AHP configuration (configured via the Web UI, passed to the > harness.xml build, and then on to the Groovy harness) was the name of the > _action_ to execute. Most of that stuff should be fairly straightforward. > > So after a build is started (maybe from a Web UI click, or SVN change > detection, or a TCK runtests iteration) the following happens (in simplified > terms): > > * Agent starts build > * Agent cleans its working directory > * Agent downloads the build harness > * Agent downloads any dependencies > * Agent invoke Ant on harness.xml passing in some details > * Harness.xml downloads the system/1 library > * Harness.xml runs gbuild.system.BuildHarness > * BuildHarness tries to construct a Controller instance for the project > * BuildHarness tries to find Controller action to execute > * BuildHarness executes the Controller action > * Agent publishes output artifacts > * Agent completes build > > A few extra notes on libraries, the JavaEE TCK requires a bunch of stuff we > get from Sun to execute. This stuff isn't small, but is for the most part > read-only. So I setup a location on each build agent where these files were > installed to. I created AHP projects to manage them and treated them like a > special "library" one which tried really hard not to go fetch its content > unless the local content was out of date. This helped speed up the entire > build process... cause that delete/download of all that muck really slows > down 20 agents running in parallel on 2 big machines with stripped array. > For legal reasons this stuff was not kept in svn.apache.org's main > repository, and for logistical reasons wasn't kept in the private tck repo > on svn.apache.org either. Because there were so many files, and be case > the httpd configuration on svn.apache.org kicks out requests that it > thinks are *bunk* to help save the resources for the community, I had setup > a private ssl secured private svn repository on the old gbuild.orgmachines to put in the full muck required, then setup some goo in the > harness to resolve them. This goo is all in gbuild.system.library.* See > the gbuild.config.projects.Geronimo_CTS.Controller for more of how it was > actually used. > > * * * > > Okay, that is about all the brain-dump for TCK muck I have in me for > tonight. Reply with questions if you have any. > > Cheers, > > --jason > > > -- ~Jason Warner ------=_Part_28163_31674386.1224778066278 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Jason,

Now that I've got my hands on anthill to play with, I&= #39;m diving into setting up things.  I was hoping you'd be able t= o clarify for me a little bit how the build-support stuff was integrated wi= th the anthill stuff.  Specifically, I'm working on setting up a p= roject in anthill to build the geronimo server from the trunk in the reposi= tory.  This seems like a good first step to me.  From what you sp= ecified in your explanation, it seems that every step of this automated tes= ting had an anthill project and a corresponding groovy-based controller.&nb= sp; So for the geronimo build, I would have an anthill project devoted to b= uilding the server which would help with shuffling artifacts around, cleani= ng working directories, and other such pre/post build things, but the actua= l build would be handled by the controller?  So the anthill project wo= uld actually be launching the controller rather than the build?

Thanks!

On Thu, Oct 2, 2008 at 2:34 P= M, Jason Dillon <jason.dillon@gmail.com> wrote:
On Oct 1, 2008, at 11:20 PM, Jason Warner wrote:

Is the GBuild stuff in svn the same as the anthill-based code or is that so= mething different?  GBuild seems to have scripts for running tck and t= hat leads me to think they're the same thing, but I see no mention of a= nthill in the code.

The Anthill stuff is completely different than the GBuild stuff.  I st= arted out trying to get the TCK automated using GBuild, but decided that th= e system lacked too many features to perform as I desired, and went ahead w= ith Anthill as it did pretty much everything, though had some stability pro= blems.

One of the main reasons why I choose Anthill (AHP, Anthill Pro that is) was= its build agent and code repository systems.  This allowed me to ensu= re that each build used exactly the desired artifacts.  Another was th= e configurable workflow, which allowed me to create a custom chain of event= s to handle running builds on remote agents and control what data gets set = to them, what it will collect and what logic to execute once all distribute= d work has been completed for a particular build.  And the kicker whic= h help facilitate bringing it all together was its concept of a build life.=

At the time I could find *no other* build tool which could meet all of thes= e needs, and so I went with AHP instead of spending months building/testing= features in GBuild.

While AHP supports configuring a lot of stuff via its web-interface, I foun= d that it was very cumbersome, so I opted to write some glue, which was sto= red in svn here:

   https://svn.apache.org/view= vc/geronimo/sandbox/build-support/?pathrev=3D632245

Its been a while, so I have to refresh my memory on how this stuff actually= worked.  First let me explain about the code repository (what it call= s codestation) and why it was critical to the TCK testing IMO.  When w= e use Maven normally, it pulls data from a set of external repositories, pi= cks up more repositories from the stuff it downloads and quickly we loose c= ontrol where stuff comes from.  After it pulls down all that stuff, it= churns though a build and spits out the stuff we care about, normally stuf= fing them (via mvn install) into the local repository.

AHP supports by default tasks to publish artifacts (really just a set of fi= les controlled by an Ant-like include/exclude path) from a build agent into= Codestation, as well as tasks to resolve artifacts (ie. download them from= Codestation to the local working directory on the build agents system). &n= bsp;Each top-level build in AHP gets assigned a new (empty) build life. &nb= sp;Artifacts are always published to/resolved from a build life, either tha= t of the current build, or of a dependency build.

So what I did was I setup builds for Geronimo Server (the normal server/tru= nk stuff), which did the normal mvn install thingy, but I always gave it a = custom -Dmaven.local.repository which resolved to something inside the work= ing directory for the running build.  The build was still online, so i= t pulled down a bunch of stuff into an empty local repository (so it was a = clean build wrt the repository, as well as the source code, which was alway= s fetched for each new build).  Once the build had finished, I used th= e artifact publisher task to push *all* of the stuff in the local repositor= y into Codestation, labled as something like "Maven repository artifac= ts" for the current build life.

Then I setup another build for Apache Geronimo CTS Server (the porting/bran= ches/* stuff).  This build was dependent upon the "Maven reposito= ry artifacts" of the Geronimo Server build, and I configured those art= ifacts to get installed on the build agents system in the same directory th= at I configured the CTS Server build to use for its local maven repository.=  So again the repo started out empty, then got populated with all of = the outputs from the normal G build, and then the cts-server build was star= ted.  The build of the components and assemblies is normally fairly qu= ick and aside from some stuff in the private tck repo won't download mu= ck more stuff, because it already had most of its dependencies installed vi= a the Codestation dependency resolution.   Once the build finished, I = published to cts-server assembly artifacts back to Codestation under like &= quot;CTS Server Assemblies" or something.

Up until this point its normal builds, but now we have built the G server, = then built the CTS server (using the *exact* artifacts from the G server bu= ild, even though each might have happened on a different build agent). &nbs= p;And now we need to go and run a bunch of tests, using the *exact* CTS ser= ver assemblies, produce some output, collect it, and once all of the tests = are done render some nice reports, etc.

AHP supports setting up builds which contain "parallel" tasks, ea= ch of those tasks is then performed by a build agent, they have fancy build= agent selection stuff, but for my needs I had basically 2 groups, one grou= p for running the server builds, and then another for running the tests. &n= bsp;I only set aside like 2 agents for builds and the rest for tests.  = ;Oh, I forgot to mention that I had 2 16x 16g AMD beasts all running CentOS= 5, each with about 10-12 Xen virtual machines running internally to run bu= ild agents.  Each system also had a RAID-0 array setup over 4 disks to= help reduce disk io wait, which was as I found out the limiting factor whe= n trying to run a ton of builds that all checkout and download artifacts an= d such.

I helped the AHP team add a new feature which was an parallel iterator task= , so you define *one* task that internally fires off n parallel tasks, whic= h would set the iteration number, and leave it up to the build logic to pic= k what to do based on that index.  The alternative was a unwieldy set = of like 200 tasks in their UI which simply didn't work at all.  Yo= u might have notice an "iterations.xml" file in the tck-testsuite= directory, this was was was used to take an iteration number and turn it i= nto what tests we actually run.  The <iteration> bits are order = sensitive in that file.

Soooo, after we have a CTS Server for a particular G Server build, we can n= o go an do "runtests" for a specific set of tests (defined by an = iteration)... this differed from the other builds above a little, but still= pulled down artifacts, the CTS Server assemblies (only the assemblies and = the required bits to run the geronimo-maven-plugin, which was used to geron= imo:install, as well as used by the tck itself to fire up the server and so= on).  The key thing here, with regards to the maven configuration (be= sides using that custom Codestation populated repository) was that the buil= ds were run *offline*.

After runtests completed, the results are then soaked up (the stuff that ja= vatest pukes out with icky details, as well as the full log files and other= stuff I can recall) and then pushed back into Codestation.

Once all of the iterations were finished, another task fires off which gene= rates a report.  It does this by downloading from Codestation all of t= he runtests outputs (each was zipped I think), unzips them one by one, run = some custom goo I wrote (based some of the concepts from original stuff fro= m the GBuild-based TCK automation), and generates a nice Javadoc-like repor= t that includes all of the gory details.

I can't remember how long I spent working on this... too long (not the = reports I mean, the whole system).  But in the end I recall something = like running an entire TCK testsuite for a single server configuration (lik= e jetty) in about 4-6 hours... I sent mail to the list with the results, so= if you are curious what the real number is, instead of my guess, you can l= ook for it there.  But anyway it was damn quick running on just those = 2 machines.  And I *knew* exactly that each of the distributed tests w= as actually testing a known build that I could trace back to its artifacts = and then back to its SVN revision, without worrying about mvn downloading s= omething new when midnight rolled over or that a new G server or CTS server= build that might be in progress hasn't compromised the testing by poll= uting the local repository.

 * * *

So, about the sandbox/build-support stuff...

First there is the 'harness' project, which is rather small, but co= ntains the basic stuff, like a version of ant and maven which all of these = builds would use, some other internal glue, a  fix for an evil Maven p= roblem causing erroneous build failures due to some internal thread state c= orruption or gremlins, not sure which.  I kinda used this project to h= elp manage the software needed by normal builds, which is why Ant and Maven= were in there... ie. so I didn't have to go install it on each agent e= ach time it changed, just let the AHP system deal with it for me.

This was setup as a normal AHP project, built using its internal Ant builde= r (though having that builder configured still to use the local version it = pulled from SVN to ensure it always works.

Each other build was setup to depend on the output artifacts from the build= harness build, using the latest in a range, like say using "3.*"= for the latest 3.x build (which looks like that was 3.7).  This let m= e work on new stuff w/o breaking the current builds as I hacked things up.<= br>
So, in addition to all of the stuff I mentioned above wrt the G and CTS bui= lds, each also had this step which resolved the build harness artifacts to = that working directory, and the Maven builds were always run via the versio= n of Maven included from the harness.  But, AHP didn't actually ru= n that version of Maven directly, it used its internal Ant task to execute = the version of Ant from the harness *and* use the harness.xml buildfile.
The harness.xml stuff is some more goo which I wrote to help mange AHP conf= igurations.  With AHP (at that time, not sure if it has changed) you h= ad to do most everything via the web UI, which sucked, and it was hard to r= efactor sets of projects and so on.  So I came up with a standard set = of tasks to execute for a project, then put all of the custom muck I needed= into what I called a _library_ and then had the AHP via harness.xml invoke= it with some configuration about what project it was and other build detai= ls.

The actual harness.xml is not very big, it simply makes sure that */bin/* i= s executable (codestation couldn't preserve execute bits), uses the Cod= estation command-line client (invoking the javaclass directly though) to as= k the repository to resolve artifacts from the "Build Library" to= the local repository.  I had this artifact resolution separate from t= he normal dependency (or harness) artifact resolution so that it was easier= for me to fix problems with the library while a huge set of TCK iterations= were still queued up to run.  Basically, if I noticed a problem due t= o a code or configuration issue in an early build, I could fix it, and use = the existing builds to verify the fix, instead of wasting an hour (sometime= s more depending on networking problems accessing remote repos while buildi= ng the servers) to rebuild and start over.

This brings us to the 'libraries' project.  In general the ide= a of a _library_ was just a named/versioned collection of files, where you = could be used by a project.  The main (er only) library defined in thi= s SVN is system/.  This is the groovy glue which made everything work.=  This is where the entry-point class is located (the guy who gets inv= oked via harness.xml via:

   <target name=3D"harness" depends=3D"init&qu= ot;>
       <groovy>
           <classpath>
               <pathelement loc= ation=3D"${library.basedir}/groovy"/>
           </classpath>

           gbuild.system.BuildHarness.bootst= rap(this)
       </groovy>
   </target>

I won't go into too much detail on this stuff now, take a look at it an= d ask questions.  But, basically there is stuff in gbuild.system.* whi= ch is harness support muck, and stuff in gbuild.config.* which contains con= figuration.  I was kinda mid-refactoring of some things, starting to a= dd new features, not sure where I left off actually. But the key bits are i= n gbuild.config.project.*  This contains a package for each project, w= ith the package name being the same as the AHP project (with " " = -> "_"). And then in each of those package is at least a Contr= oller.groovy class (or other classes if special muck was needed, like for t= he report generation in Geronimo_CTS, etc).

The controller defines a set of actions, implemented as Groovy closures bou= nd to properties of the Controller class.  One of the properties passe= d in from the AHP configuration (configured via the Web UI, passed to the h= arness.xml build, and then on to the Groovy harness) was the name of the _a= ction_ to execute.  Most of that stuff should be fairly straightforwar= d.

So after a build is started (maybe from a Web UI click, or SVN change detec= tion, or a TCK runtests iteration) the following happens (in simplified ter= ms):

 * Agent starts build
 * Agent cleans its working directory
 * Agent downloads the build harness
 * Agent downloads any dependencies
 * Agent invoke Ant on harness.xml passing in some details
 * Harness.xml downloads the system/1 library
 * Harness.xml runs gbuild.system.BuildHarness
 * BuildHarness tries to construct a Controller instance for the proje= ct
 * BuildHarness tries to find Controller action to execute
 * BuildHarness executes the Controller action
 * Agent publishes output artifacts
 * Agent completes build

A few extra notes on libraries, the JavaEE TCK requires a bunch of stuff we= get from Sun to execute.  This stuff isn't small, but is for the = most part read-only.  So I setup a location on each build agent where = these files were installed to.  I created AHP projects to manage them = and treated them like a special "library" one which tried really = hard not to go fetch its content unless the local content was out of date. =  This helped speed up the entire build process... cause that delete/do= wnload of all that muck really slows down 20 agents running in parallel on = 2 big machines with stripped array.  For legal reasons this stuff was = not kept in svn.apache.= org's main repository, and for logistical reasons wasn't kept i= n the private tck repo on svn.apache.org either.  Because there were so many files, and b= e case the httpd configuration on svn.apache.org kicks out requests that it thinks are *bunk*= to help save the resources for the community, I had setup a private ssl se= cured private svn repository on the old gbuild.org machines to put in the full muck required, then= setup some goo in the harness to resolve them.  This goo is all in gb= uild.system.library.*  See the gbuild.config.projects.Geronimo_CTS.Con= troller for more of how it was actually used.

 * * *

Okay, that is about all the brain-dump for TCK muck I have in me for tonigh= t.  Reply with questions if you have any.

Cheers,

--jason





--
~Jason Warner ------=_Part_28163_31674386.1224778066278--