lscm - how to download baseline
Hello,
we are making projects that consist from a lot of small blocks, that doesn't have to be in the latest version, so I'm looking for easy way to list and download a specific version of particular block. Best with command line, for automation purposes.
I find out that with use of lscm.bat it is possible to list workspaces, snapshots, baselines, but no way to download a full package of baseline. I was able to download a snapshot by creating a workspace first, then loading that workspace.
Is there a better quicker way to download a Component's baseline? I'm looking for command line equivalent of that button [Download on Web UI in baseline view]
One answer
As far as I can tell, the scm command line command to use here would be load.
This loads the data of a repository workspace or stream into a local sandbox in order to give users access to change it.
As far as I can tell, we do not have a special load for baselines. To be able to load the desired data, you would create a stream or repository workspace and add the components (component baselines) to the stream. The workspace represents the system.
In addition, it is possible to use load rules to control where to load stuff into a different structure.
I know that customers use it this way. Some have also created their own automation to generate workspaces and load rules.
Note that the download does not create a zip file, the sandbox is uncompressed.
For various reasons, I have created https://github.com/jazz-community/ewm-scm-utils , which downloads and zips the latest state of a workspace. This also allows to and shows the code needed to download a component baseline - the command downloadComponentBaseline.
Note that this is not production grade code and we have seen out of memory errors when uploading/downloading workspaces with thousands of components.