It's all about the answers!

Ask a question

Jazz Build: how to determine the build sucess/failure


david beaurpere (5685) | asked Jul 24 '09, 11:30 a.m.
Hi,

i am currently looking at migrating our team to RTC.

Regarding the build integration, is it possible to have a jazz build automatically determine its success or failure based on custom criterias?

For exemple our build runs would include, coverage reports, functional test reports... for which I did not see any specific support like you do for junit or eclipse logs.
Is there a way to use those extra reports/log/resources to compute the build result?

rgds,
d.

6 answers



permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Jul 25 '09, 3:39 a.m.
david.brpr wrote:
Hi,

i am currently looking at migrating our team to RTC.

Regarding the build integration, is it possible to have a jazz build
automatically determine its success or failure based on custom
criterias?

For exemple our build runs would include, coverage reports, functional
test reports... for which I did not see any specific support like you
do for junit or eclipse logs.
Is there a way to use those extra reports/log/resources to compute the
build result?

rgds,
d.

I have included in my builds static analysis performed by other tool. In
this case, what I did was analyze the results from ANT script and send
an error signal with error details
(http://ant.apache.org/manual/CoreTasks/fail.html) in case of problem so
the Build is marked as failed and in the log you can see the reason.

To get some integration like JUnit one... will requiere some custom
extension development and won't be so easy:
http://jazz.net/forums/viewtopic.php?t=4978

Hope this helps,

Chemi.

permanent link
Nick Edgar (6.5k711) | answered Jul 29 '09, 7:27 p.m.
JAZZ DEVELOPER
As Chemi mentioned, the overall success of the build script affects the status of the build result. But it's also possible for contributions to affect the status. In particular, the logPublisher Ant task takes an optional status attribute. So if you upload a log with status ERROR, the overall status will be ERROR. Basically the status is the most severe across all the contributions and from the result of running the srcipt.

For more details about the logPublisher task, see:
http://publib.boulder.ibm.com/infocenter/rtc/v2r0m0/topic/com.ibm.team.build.doc/topics/r_logpublisher.html

permanent link
Nick Edgar (6.5k711) | answered Jul 29 '09, 7:36 p.m.
JAZZ DEVELOPER
Note that providing status for individual contributions has some advantages over failing the script as a whole:
- the icon for an entry in the logs list conveys its status (ok / warning / error)
- the icon for Logs tab conveys the combined status of the entries.

Although not documented, it appears that the status attribute will work for all the Publisher tasks, not just logPublisher.

permanent link
david beaurpere (5685) | answered Jul 30 '09, 4:26 a.m.
that's perfect,
thanks for the info

permanent link
Patrick Renaud (106143) | answered Jul 31 '09, 9:42 a.m.
Note that providing status for individual contributions has some advantages over failing the script as a whole:
- the icon for an entry in the logs list conveys its status (ok / warning / error)
- the icon for Logs tab conveys the combined status of the entries.

Although not documented, it appears that the status attribute will work for all the Publisher tasks, not just logPublisher.


It is not working with the JUnitLogPublisherTask.

Executing tasks
------------------------------------------------------------------------
BUILD ERROR
------------------------------------------------------------------------
Error executing ant tasks

Embedded error: Class com.ibm.team.build.ant.task.JUnitLogPublisherTask doesn't support the "status" attribute.

Would you have another suggestion to make?

permanent link
Nick Edgar (6.5k711) | answered Aug 05 '09, 11:26 a.m.
JAZZ DEVELOPER
> it appears that the status attribute will work for all the Publisher tasks, not just logPublisher

Sorry, I overstated this. The status attribute only works for tasks: artifactFilePublisher, filePublisher and logPublisher.

For junitLogPublisher and jdtCompileLogPublisher, it takes the status from the most severe entry in the source file (i.e. if there's a compile error or a failed test, then the status is ERROR).

Your answer


Register or to post 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.