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

Is there a way to automate the component replacement between streams?

Here is what I do:-
  1. I have two streams 'Development Stream' and 'Integration Stream' having same components.
  2. Whenever I have to promote the code from Development to Integration, I manually replace each component in Integration stream with that from Development stream build snapshot of the build to be promoted.
  3. Please note that I need to promote code from a given build snapshot and NOT directly from the stream.
  4. Also, not all components are replaced as per our business requirement

So here are my questions:-
  1. Is there any better way to perform this code promotion?
  2. Going forward, is there any way to automate this process as we need to do it periodically?
  3. Is there command line API that I can use from shell scripts to perform this task?

Thanks!

0 votes



2 answers

Permanent link
Hi,

https://jazz.net/library/#q=&tag=scm provides you with a lot of interesting articles around SCM. Interesting in your context could be https://jazz.net/library/article/649 and https://jazz.net/library/article/40 and https://jazz.net/blog/index.php/2008/03/13/keeping-a-weekly-rhythm/ I would like to suggest to look into some of them.

There are several ways how you can do such things. The way I think this was supposed to be done with RTC is to use the flow target, with the snapshot for integration loaded into the repository workspace (you can create a repo worspace from a snapshot), set to the integration stream.

A typical integrator would have set up an integration repository workspace that flows to the development stream (default) and the integration stream. The integrator can, using the pending changes view, replace the content of the repository workspace with the snapshot to integrate and change the flow target to the integration stream.

The pending changes will show you the outgoing changes, including the baselines. You deliver what needs to be delivered. If there are modifications on the integration stream, which can happen if more than one team with separate development streams works against it, this would be the opportunity to accept and integrate them prior to deliver and later deliver the integrated code back to the own development stream.


There might be other ways to do it, and it would be interesting to learn how others do this.

1 vote

Comments

I suggest taking a look at https://jazz.net/library/article/649 that Ralph posted. The post-build deliver in particular sounds like it would fit your needs.


Permanent link
If you are looking at a command line solution (that can be used in scripts), you could use the following command...
Usage:
scm workspace replace-components [options] <workspace> <replace-type> <replace> [components...]
  workspace    - The target workspace or stream. To specify the workspace or stream, use its name[@repo], alias, or UUID[@repo].
  replace-type - Type of the item to replace. One of: "workspace", "stream", or "snapshot"
  replace      - Item to replace (must be of type specified in replace-type) name[@repo], alias or UUID[@repo].
  components   - Components to replace from the workspace, stream or snapshot (name, alias or UUID)

For ex: lscm workspace replace-components "Integration Stream name" snapshot "Development stream build snapshot name" "Comp1" "Comp2" -r https://Your_repository_Uri

1 vote

Comments

This solution is more like what I wanted... Thanks Shashikant!

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
× 1,700
× 383

Question asked: Jul 10 '12, 3:23 a.m.

Question was seen: 4,564 times

Last updated: Jul 12 '12, 1:31 a.m.

Confirmation Cancel Confirm