Build Engine Not Working?
Hi, I'm working through evaluating Jazz as an ALM candidate for our company. As part of this work I've been trying to use features of Jazz from end-to-end and today I was workign on setting up a build engine.
I created ant build file, setup a build definition and a build engine, downloaded the separate build system zip file and installed it. Then ran the jbe with my engineid to kick things off. Everything seems to work, except that prior to actually doing my project build, I get an exception: Invoking pre-build participant "com.ibm.team.build.jazzscm"
|
8 answers
Hey, so I created a dedicated workspace for building and that seems to help a lot, there are still problems though, the tutorial says to use a "fetched" sub-directory, and my version of Jazz doesn't actually use a fetched sub-diretory. Beyond that the problem for me is that I can't checkin my build.xml file...the workbench just silently ignores my request. I'm going to try checking it in from a different user though, I think the meta data for this user is corrupt.
I figured out how to generate a build.xml, instead of writing one by hand, just export the project as Ant build file. Works good, but isn't really so obvious :( (^_^)/ mike. |
Hi, so I fixed my build.xml issue;
1) The tutorial says a "fetched" sub-directory is used. This must be out of date, my download of the latest Jazz does not use a fetched directory. 2) I think the meta data for my Jazz installation is messed up on one of the machines I installed it on. That machine (happens to be at work), can not check in any files, the GUI just silently does nothing, no Java exceptions in the log, just nothing :( However, the Jazz I installed on my home machine can check in and deliver without problem. And at work, that machine can see the incomming changes once they have been delivered. Can not see the changes when only checked in...I think its supposed though? Are you not supposed to be able to preview other designers work before they actually deliver? Anyways, I was able to do a build by incorporating changes from multiple (fake!) users, very cool. The build system seems very flexible, but it seems awkward that I have to manually accept changes into the build workspace before launching builds. For continuous integration it would be more convenient (I think) if the build enging could just build a load every hour say, and if there is an error, thats ok, that load is flagged for followup. Is there a way to make the built in Jazz build system be more automatic so I don't have to manually launch builds on demand? I'm sure this has already been done by other people before. (^_^)/ mike. |
Hi Mike,
I'm glad you could get a build up and running. I'll try to address the issues you've raised about your experience so far. 1) Ant and generating build files The Build component is designed to allow integration between your build system and Jazz. Creating the build scripts (in the case of Ant, the build.xml files) themselves is beyond the scope of the component. However, for first time users I can see how it could be helpful to mention the export-as-ant-build-file capability of Eclipse. 2) Scheduling builds and accepting changes You can schedule your builds to run at preset intervals by editing the relevant build definition. Open your build definition editor and click on the scheduling tab. You can indicate on what days the build should run and either a set time or an interval. On the "Jazz SCM" tab (for SCM builds) you can also specify whether or not the build should accept current changes into the designated workspace before building. You can also specify that the build be performed only if new changes were accepted. 3) Incoming changes Your "Pending Changes" view will show changes incoming from whichever workspace or stream you currently have set as a "Flow Target". If, as in the sample case, you are targeting a Stream, you will only see the changesets after they are delivered to the Stream. If your flow target is a workspace, then you will see the changes when the user checks them in. 4) Fetched directory On the "Jazz SCM" page of your build definition editor, there is a "Load directory" item. There you can specify a directory on the build machine as a destination for the fetched code (the default if you leave it blank is the working directory of the build engine process). The tutorial simply uses "fetched" as the name of the directory - you probably left it blank, so the default directory was used. Cheers! Jason dinobot71 wrote: Hi, so I fixed my build.xml issue; -- Jason Bird Jazz Team Build |
Hey Jason, thanks! Just saw your answer...I figure out most of that stuff by just playing around with the GUI...probably should have beeen more patient before asking :)
Basically my problems were due to being on windows and installing the server/client in a directory with spaces in its path and installing on different drives. Once I removed those two issues, everything has been running smoothly, Although I've noticed that I can't open some work items in the news feed on remote machines. I've noticed also that someone else has reported this and their situation sounds exactly like mine. I'll monitor that discussion through to see what happens. Basically, now I'm trying to figure out how to get JUnit results and compile results to show up as an artifact of the build. My build result says they are missing, although I edited the Ant command line to add the junit target and it gets run during the build. I don't see yet how in the workbench to tell Jazz to take the index.html file from the junit directory and use it as the "result" for JUnit testing. I'll keep playing with it though and see if I can figure it out. Thanks for all the help so far! (^_^)/ mike. |
If you already have the ant build creating your JUnit results then you've done the hard part and the rest is butter. You simply need to publish those results to your build result within your ant build using our task. The filePath can be a single file or a directory of results.
<junitLogPublisher buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${userId}" password="${password}" filePath="${datadir}/junit.logs/com.ibm.team.build.tests.AllTests.results.xml/> Don Weinand Jazz Team Build |
You might also want to follow these two work items. Once these are fixed,
you'll be able to get compile and junit results published without having to modify your ant script. https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/45935 https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/32400 --- Ryan Manwiller Jazz Team Build |
Cool, thanks guys! Yes I actually found the LogPublisher stuff mentioned in the example build.xml that is buried in the examples directory of the build engine. Once I plugged that in everything worked like a charm, except that the example is out of date for logging the compiler output. I couldn't find any options on the javac task that would work for sending output to a log file. So I still get a compile log missing status in the build result :(
There is -Xstdout, but it didn't seem to work, I might have messed something up though. I also tried using the <recorder> but then I couldn't use the LogPublisher after the <recorder>, some XML parsing error about not being able to include content in the prolog? Oh well, not critical; the main thing is that I can clearly show scheduled continuous builds now with JUnit results easily being accessed from the build result. Basic continuous integration. So, I have pretty much traceability from end to end, I can create stories, make work items for them, change code and submit the code all within a traceable context. Nice! I'll check out those other bug reports, I think I'm pretty much good to go though. I do want to take a look at some of the continuous integration tools I've heard about Continuum and Hudson? But Eclipse is already doing it at least in a minimum way so I think I'm good to go. Thanks again for the help! (^_^)/ moike. |
Our compile publishing task only works with the eclipse java compiler (ECJ),
also known as the JDT compiler (thus the name of our jdtCompileLogPublisher). The example at /jazz/buildsystem/buildtoolkit/examples/compile-and-test/build.xml includes instructions at the top for using ecj instead of javac. --- Ryan Manwiller Jazz Team Build |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.