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

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.

0 votes


Accepted answer

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

1 vote

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.

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
× 12,019
× 1,700
× 1,381

Question asked: Sep 10 '19, 11:39 a.m.

Question was seen: 2,073 times

Last updated: Sep 13 '19, 4:46 p.m.

Confirmation Cancel Confirm