Jazz Build: how to determine the build sucess/failure
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 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
david.brpr wrote:
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.
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.
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
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
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.
- 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.
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?
> 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).
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).