It's all about the answers!

Ask a question

Determine changed component during build.


Niraj Doshi (173) | asked Sep 10, 11:39 a.m.
retagged Sep 13, 4:46 p.m. by Ken Tessier (84117)
Hello,

I have stream with multiple components in it, and there is a build definition to build that stream using command-line build. When build gets kicked-off, I would like to send a list of changed components as a command-line argument within the build definition.

The question is, is it possible to determine what components changed, and have build definition use it as build property or otherwise?

Thank you.

Accepted answer


permanent link
Ulf Arne Bister (1.2k7) | answered Sep 11, 8:18 a.m.
Hi,
the short answer: yes, it is principally possible. However, there is no easy out of the box way of achieving this. So it is worthwhile to ask back what exactly does your build need? Name of components? Actual handle to the components?

Depending on the use case I can envision two approaches:
1. Set build definition option "accept before fetch" and "build only when changes" in Jazz SCM tab. Pass snapshot UUID as build parameter, use scripting within build scripts to determine list of change sets and retrieve components from that information. Takes a moderate amount of knowledge in scripting and a bit deeper knowledge of RTC Client Side API.

2. Write your own build toolkit plugin which does the above (take build snapshot, look at accepted change sets, find components). This takes java knowledge and deep knowledge of the RTC Client API. Info about how to write your own build toolkit plugin can be found here: https://www.ibm.com/developerworks/community/blogs/7685ca43-63d4-4946-89fd-58d379a896d1/entry/Extending_the_Rational_Team_Concert_Build_Engine?lang=en

If this is helpful please mark the answer accepted.
- Arne
Niraj Doshi selected this answer as the correct answer

Comments
Niraj Doshi commented Sep 11, 10:02 a.m.

Thanks for the response, Ulf. To answer your question, I just need the name of the components, and you have pointed me in the right direction with you proposal# 1.

Let's say I get the snapshot UUID as the parameter in my script, could you point me to list of commands available? Should I be using lscm.exe to get my information like the example here [https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.scm.doc/topics/list_snapshots.html&scope=null]?

Thank you again!


Niraj Doshi commented Sep 11, 10:29 a.m. | edited Sep 11, 10:29 a.m.
Ulf,

I think I am getting close.. here's the command I am using:
scm list changesets -w "<workspace>", but I am still trying to figure out how to get component name from the list.

Your answer


Register or to post your answer.