Bazaar and Hudson
Matt McClure
mlm at aya.yale.edu
Sun Oct 26 16:30:32 GMT 2008
Hi Guillermo,
On Fri, Oct 17, 2008 at 3:48 AM, Guillermo Gonzalez
<guillo.gonzo at gmail.com> wrote:
> After ~1 1/2 days of playing with Hudson I have a working bazaar plugin. It's not fully implemented (or tested), but it's working quite well.
> Consider it a preview ;-)
Thanks for writing the Bazaar plugin for Hudson! I'm trying it out
for bzr-p4 (https://edge.launchpad.net/bzrp4). I have a Hudson job
that gets code from Bazaar and runs my tests, and I can trigger it
manually.
I haven't been able to get polling working. In the Hudson UI, I see:
Last Bazaar Polling Log
Started on Oct 26, 2008 12:22:44 PM
Fetching remote revision-info
Unable to get version-info from
/home/mlm/sandbox/bzr-p4/bzr/continuous.integration.windows
Done. Took 0 sec
No changes
In the console window where I started Hudson, I see:
Oct 26, 2008 12:22:44 PM hudson.plugins.bazaar.BazaarSCM pollChanges
SEVERE: 3
java.lang.ArrayIndexOutOfBoundsException: 3
at hudson.plugins.bazaar.BazaarSCM.getRevno(BazaarSCM.java:180)
at hudson.plugins.bazaar.BazaarSCM.pollChanges(BazaarSCM.java:139)
at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:711)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:253)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:285)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:907)
at java.lang.Thread.run(Thread.java:619)
Here's how I set up my Hudson job:
1. Download Hudson 1.255 from
https://hudson.dev.java.net/servlets/ProjectDocumentList?folderID=2761&expandFolder=2761&folderID=0
2. Download/install Bazaar 1.8 Windows installer from
https://launchpad.net/bzr/+download . Add Bazaar to PATH.
3. Download/install bzr-xmloutput from lp:bzr-xmloutput via bzr branch.
See http://bazaar-vcs.org/XMLOutput .
4. java -jar hudson.war . Point browser at http://localhost:8080/ .
Note: maybe need larger heap size. -Xmx1024m ?
5. Download Bazaar plugin for Hudson from
http://verterok.com.ar/bzr-hudson/bazaar.hpi . Install via Hudson web
UI.
6. New Job in Hudson. Job name = bzrp4, e.g. Build a
free-style software project.
7. Advanced Project Options > Use custom workspace. Directory =
C:\Documents and Settings\mlm\.hudson\jobs\bzrp4\workspace\bzrp4 , i.e.,
a path ending in "bzrp4". Otherwise, Hudson uses the path ending in
"workspace". That doesn't work because bzr selftest relies on loading
the bzrp4 plugin from a path ending in "bzrp4".
8. Source Code Management > Bazaar. Branch URL =
/home/mlm/sandbox/bzr-p4/bzr/continuous.integration.windows . I tried
C:\home\... but it didn't work because Hudson's URL parsing rejected the
URL containing backslashes.
9. Build > Add build step > Execute Windows batch command . Command =
ci.selftest.bat .
Matt
More information about the bazaar
mailing list