Is there a way to automate the component replacement between streams?
Here is what I do:-
So here are my questions:-
Thanks!
- I have two streams 'Development Stream' and 'Integration Stream' having same components.
- 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.
- Please note that I need to promote code from a given build snapshot and NOT directly from the stream.
- Also, not all components are replaced as per our business requirement
So here are my questions:-
- Is there any better way to perform this code promotion?
- Going forward, is there any way to automate this process as we need to do it periodically?
- Is there command line API that I can use from shell scripts to perform this task?
Thanks!
2 answers
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.
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.
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.
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
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