Trigger a build if the SCM updated
I know the schedule build can automatically build in RTC, but if I deliver the code in SCM, would it trigger a build immediately? how can i realize this?
|
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. Yuan Xu selected this answer as the correct answer
|
One other answer
Ralph Schoon (63.5k●3●36●46)
| answered Jun 03 '15, 3:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 03 '15, 3:21 a.m.
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. Comments Hi~ Ralph, thanks a lot for your answer.
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.
|
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.