How to create a snapshot for a stream using CLI
Hi All,
We are using the CLI to automate the snapshot creation after a successful build job. We are able to execute the commands to create the snapshot and deliver it from the workspace, but the snapshot is not displayed under the snapshot tab of the respective stream. We are able to see that the baselines for the components are getting created and using deliver command the baselines are getting delivered. We also used the command "snapshot promote" and able to promote respective snapshot successfully but the snapshot is still not displayed under the stream. We are currently working on both 6.0.6.1 and 7.0.2 environments.
Please let us know how do we overcome the issue and view the snapshots under the stream.
Following are the commands:
scm.exe create snapshot -f -n snapshot1 -r theRepo "Workspace_A"
scm.exe deliver -i -r theRepo -s Workspace_A
scm.exe snapshot promote Workspace_A snaphot1 -r theRepo
Thanks,
Vinay
Accepted answer
This is the documentation of the 7.0.2 SCM Command Line:
- There is no scm snapshot promote command that I could find.
- The Deliver operation has a ton of parameters that would be worth checking: https://jazz.net/clmhelp/topic/com.ibm.team.scm.doc/topics/deliver.html
I think it would be a good example to use a client and to create a shell script that works against a test stream/workspace. Get the script to working condition - you will see the output immediately. Once it works, you can put it into the build.
Try set attributes e.g. set attributes -s --ownedby
https://www.ibm.com/docs/en/elm/7.0.2?topic=set-attributes
https://www.ibm.com/docs/en/elm/7.0.2?topic=set-attributes
Use show attributes -s to check the attributes of a snapshot.
Comments
Hi Ralph,
Thank you for your response.
The promote command is available in 6.x versions of RTC and found that it is deprecated in EWM 7.x and suggesting to use set attributes as shown below.
C:\Program Files\IBM\EWMBuild\scmtools\eclipse>scm.exe help snapshot promote
Problem running 'help':
This command has been deprecated. Use "set attribute" command. To display the deprecated help, set the environment variable SHOW_DEPRECATED_HELP=1. Try 'scm help' for more information.
Thanks,
Vinay