Trigger a build if the SCM updated
Accepted answer
Please see the last two posts here
https://jazz.net/forum/questions/132739/jenkins-polling-is-too-slow-can-rtc-notify-jenkins-immediately
there are two extensions, like described by Ralph, that do provide triggering builds on deliver
One does JBE/ Build defs,
and mine supports a script where you can do whatever you want, ala git and SVN commit commit and post_receive hooks.
https://jazz.net/forum/questions/132739/jenkins-polling-is-too-slow-can-rtc-notify-jenkins-immediately
there are two extensions, like described by Ralph, that do provide triggering builds on deliver
One does JBE/ Build defs,
and mine supports a script where you can do whatever you want, ala git and SVN commit commit and post_receive hooks.
One other answer
No, it wouldn't. The JBE polls for build requests created by a schedule.
You would have to create a deliver follow up action similar to the Rational Team Concert Extensions Workshop you would work on the operation ID com.ibm.team.scm.server.deliver (Extension Points and Operation ID’s). I think you can reuse most of its code as well.
Restrict Delivery of Changesets Associated to Wrong Work Item Types Advisor shows an Advisor for that operation (you want a participant), but it should give you some hints about the API as the same is used in advisors and participants.
To understand what you are up to, and how to get started you might want to read Setting up Rational Team Concert for API Development as well, it expands on the workshop content.
You would have to create a deliver follow up action similar to the Rational Team Concert Extensions Workshop you would work on the operation ID com.ibm.team.scm.server.deliver (Extension Points and Operation ID’s). I think you can reuse most of its code as well.
Restrict Delivery of Changesets Associated to Wrong Work Item Types Advisor shows an Advisor for that operation (you want a participant), but it should give you some hints about the API as the same is used in advisors and participants.
To understand what you are up to, and how to get started you might want to read Setting up Rational Team Concert for API Development as well, it expands on the workshop content.
Comments
Hi~ Ralph, thanks a lot for your answer.
and if I do not use the JBE (write a script for building), so after I deliver the code and SCM has changed, is there a way to trigger my script running immediately ? is it possible to realize?
Java allows to call the command line, so yes, that would be possible. Usually the build should be done on a build system in which case the server part of the participant has the means to connect to the build in the configuration. If you want to run the script locally, you would need to create a participant for com.ibm.team.scm.client.deliver deliver(client) instead and it needs to be deployed in the client. The rest is very similar.