Determine changed component during build.
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
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.
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
Comments
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!
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.
scm list changesets -w "<workspace>", but I am still trying to figure out how to get component name from the list.