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

How to create a build only from new or modified files in a workspace or Stream since a specific date?

 How to create a build only from new or modified files in a workspace or Stream since a specific date?   


We would like to deploy only files that were modified or files that were added to a workspace or stream since last build request.

Is it possible?

0 votes



2 answers

Permanent link
I think the general approach is to use the compare command to generate your list of changes.  In our case, we use the auto-generated snapshot (the snapshot created by our Jenkins process) and compare that to the target stream (the workflow target).  If you use the -j option to the compare command, you get output that is very easy to parse programmatically.  At that point, just copy the items that you want (i.e., those that show up as differences in your stream) and process them accordingly.


- Andy

1 vote

Comments

To add on, you tagged this as BF too.  In BF you can use a .date command in the environment to generate a date variable when the build runs, then you can .set that variable back to some variable like LAST_RUN, and then compare during the build process to determine if a build is necessary since some given date.


~Spencer


Permanent link
 Thanks Andy!

Can you please point me towards some documentation on ' -j option to the compare command'?


-Chkvirgo

0 votes

Comments

Using the lscm command, just do:


lscm help compare

For example, the command I use is:

lscm compare -r local -I "dcfw" ws "build workspace" stream target_stream -j

To get the json output, you just add the -j option to most any of the lscm commands.  If you are not familiar with lscm, you probably want to play with it a little bit.  Check out this article.  Good luck!

Thanks Andy 

I tried compare command below:


lscm compare -r local -u userid -P password workspace "wrkspc" stream target_stream -p c


Is -p c supposed to remove unchanged/empty items in wrkspc component??

Sorry, @chkvirgo, didn't realize this thread was still going on.  I haven't used prune but yes, I think you would expect that to remove unchanged componented.  If it's not working you might try putting it in quotes (-p "c").  Just an idea. .. 

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,029
× 382

Question asked: Jan 06 '14, 12:24 p.m.

Question was seen: 6,327 times

Last updated: Jan 23 '14, 5:44 p.m.

Confirmation Cancel Confirm