Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes


Accepted answer

Permanent link
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

0 votes


One other answer

Permanent link
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.

0 votes

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.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Jun 03 '15, 2:52 a.m.

Question was seen: 3,057 times

Last updated: Jun 03 '15, 8:01 a.m.

Confirmation Cancel Confirm