It's all about the answers!

Ask a question

Build Completion notification through Plain Java APIs


Reji GL (1136) | asked Jan 16 '14, 5:39 p.m.
I am trying to build a RTC Jazz client, that would get notified when a build is completed.
The intention is to have a client listening for completion of the build and trigger a local script.

Can you please let me know, if there are any listeners that can be implemented and registered against the RTC server ? I did find the APIs that can used as en extension for RCP Client. But I am looking for Plain Java APIs, if available. 

2 answers



permanent link
Ralph Schoon (58.2k23642) | answered Jan 17 '14, 4:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Some parts of the Build API are discussed here:

https://jazz.net/library/article/1229
https://jazz.net/library/article/807

I think you need to listen to an RSS Feed or poll the build API. I don't think you can use event handlers in the client. The Client does not get build events.

Comments
Reji GL commented Jan 17 '14, 11:29 a.m.

 Thanks for responding.


The solution that you have mentioned was something I was thinking of as a last option. I am not keen in implementing a solution that keeps on polling the server for build completion status. Although I could optimize the polling interval based on the average build duration.

I am interested in exploring the option mentioned in the following link

The downside of this approach is that this solution is not a standalone one, and will be a plugin to Mometics. But I think I am fine with that. 

Please, do let me know your thoughts on this.


permanent link
Lauren Hayward Schaefer (3.3k11327) | answered Jan 17 '14, 6:43 a.m.
JAZZ DEVELOPER
Hi Reji,
You can write a post build participant that will trigger events when builds complete.  The participant would live in the build engine.  More information is available in this blog post: https://jazz.net/blog/index.php/2012/12/06/how-we-save-time-with-build-engine-participants-and-you-can-too/

Comments
Reji GL commented Jan 17 '14, 11:24 a.m.
Thanks for responding.

I am attaching the flow of events that I am expecting.

RTC build notification


I am least interested in making a change in the build definition or at build engine (Not all users have access to build engine) 


Lauren Hayward Schaefer commented Jan 17 '14, 12:18 p.m.
JAZZ DEVELOPER

Triggering a local script seems a bit tricky as I don't think the build engine would have access to your local machine.  If your local script can be accessed remotely, you could kick it off in your build participant.  You could use build properties to configure exactly which script gets kicked off if it's not always in the same location for every machine.

Your answer


Register or to post your answer.