Trigger an operation after build complete in RTC server
Accepted answer
Every operation you try to perform with this extension will be performed by "admin" user so they should be permitted to everyone unless you implement an ImpersonationRunnable operation, and trigger it using the IImpersonationService. In this case you can set the user you want to perform the operation.
Comments
Good catch, Michele.
I can not find this com.ibm.team.build.category in RTC SDK 5. Is there any example how to use this event category?
You can't find it in the SDK: it's the value that you have to use in your plugin.xml (it is like operationId for advisors).
You have to create a new extension using the extension point of type com.ibm.team.process.service.eventHandlers and then in the plugin.xml editor you will see where to set the eventCategory I wrote.
e.g. :
<extension
point="com.ibm.team.process.service.eventHandlers">
<eventHandler
class="yourClass"
eventCategory="com.ibm.team.build.category.BuildResultChanged"
id="yourExtensionId"
name="yourExtensionName"
/>
</extension>
1 vote
Hi Ralph Schoon, Michele Pegoraro, i did it. Thanks you!
BTW, Can you show me what is the eventCategory for Project area, Build definition changing(rename, delete)?
I can not find any document about RTC server API, where did you find it?
In a very empirical way :-)
I've used the auto-completion of the process configuration source in the eclipse client. Go to behaviour tag and add a change-event. Then you can select the category id from a dropdown list. So you'll have any id that can be used for your extensions.
2 votes
I tried com.ibm.team.workitem.event.stateChanged, but it does not work. Do you have any idea for Project area, Build definition changing(rename, delete) event? Thank you!
One other answer
However, there is no extension point that does what you want. The reason is, that the build runs asynchronously and all the server knows about the build is sent to it from the build engine.
If you want to do additional automation during or at the end of the build, I would suggest to use the client API and perform that operation as a build step.