It's all about the answers!

Ask a question

How to create a snapshot for a stream using CLI


vinay kumar bondugula (7312872) | asked Apr 03 '23, 9:24 a.m.

 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


permanent link
Ralph Schoon (63.3k33646) | answered Apr 03 '23, 10:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 03 '23, 10:45 a.m.

 This is the documentation of the 7.0.2 SCM Command Line: 


  1. There is no scm snapshot promote command that I could find.
  2. 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 

Use show attributes -s to check the attributes of a snapshot.

Ralph Schoon selected this answer as the correct answer

Comments
vinay kumar bondugula commented Apr 05 '23, 11:02 a.m.

 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

Your answer


Register or 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.