How to capture RTC change set id automatically via SCM CLI
![]()
anoop mc (748●11●200●221)
| asked Oct 05 '17, 2:40 a.m.
retagged Oct 06 '17, 3:59 p.m. by Ken Tessier (841●1●7) Hi,
We are using SCM CLI for creating work spaces, check in, deliver etc.
When ever we do a check action a unique change set id will be generated.
How to capture the new change set id automatically.
Here each time we need to run the command scm show status then capture the change set id.
|
7 answers
![]()
Shashikant Padur (4.3k●2●7)
| answered Oct 05 '17, 4:48 a.m.
JAZZ DEVELOPER edited Oct 05 '17, 4:49 a.m. When you run the checkin command use the -j/--json option. Post that you can parse the json output to retrieve the new change set id. |
![]() Hi,
Comments upon each check-in action a new change set id will get generated. Not sure how the above solution will help |
![]() Finally we were able to achieve close to our requirement.
Sharing those information as it might be useful for someone.
./scm.sh checkin ledger.jar
./scm.sh status -j > /root/jazz/smtools/eclipse/data.json (Here you are directing the JSON output of the command using -j parameter to a file called data.json)
Note: Once you got the data inside the data.json file - the change-set UUID will be stored inside this object value pair
['workspaces'][0]['components'][0]['outgoing-changes'][0]['uuid'])
changeset=
/usr/bin/python /root/jazz/scmtools/eclipse/script.py (have written a python script which refer to the object value - ['workspaces'][0]['components'][0]['outgoing-changes'][0]['uuid'] and capture the UUID of outgoing change-set) and capture the UUID of outgoing changeset
echo $changeset (displaying the output of the variable)
./scm.sh add wi "$changeset" <work item ID> (Now we were able to substitute the change-set value with a variable called $changeset)
./scm.sh deliver --source userWorkspace1 --target "ABC_DEVOPS_SCM Stream" (Finally you can try to deliver)
This helped us to capture the RTC change-set ID automatically and deliver to the stream.
|
![]() Now we came across a strange issue where the scm is not showing the status.
In the case above we are able to login, share files successfully, run check in command.
When running ./scm.sh status it not showing anything. Are we missing something.
Verified all the permissions all seem to be fine. Let me know if there is any workaround to this issue.
|
![]() Look like this is due to permission issue in RTC. Last day when the user was given full rights in RTC SCM project area.
It started working again. Now that we are able to see the status command update.
./scm.sh status
./scm.sh show status
Workspace: (1005) "anoop_workspace1" <-> (1001) "ABC_Test_Stream"
Component: (1006) "Demo1"
Baseline: (1007) 1 "Initial Baseline"
Outgoing:
Change sets:
(1008) -*--@ "Share" 18-Oct-2017 09:36 AM
|
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.