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
Ralph Schoon (63.6k●3●36●46)
| 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:
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
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.