Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to invoke RTC CLI to create a change set, check-in the file and deliver it to the stream.

 Hi,


To automate certain custom application, we are looking for a solution using RTC CLI SCM Tool

How to invoke RTC CLI to create a change set, check-in the file and deliver it to the stream. 

Note: From the custom application build we will get a *.jar file against which we need to create a change set in RTC CLI, check in the file and then deliver to the stream.  


0 votes



4 answers

Permanent link

On your custom application build, after the JAR file creation, you have to execute ordered scm commands as:

  1. login to repository:
    scm login -r https://localhost/ccm -n repo -u ${user} -P ${password}
    
                
  2. load a repository workspace:
    scm load ${workspace} -r l
    
                    
  3. copy the JAR file into sandbox
  4. create change-set (check-in):
    scm checkin project/file.jar
    
                
  5. retrieve the change-set ID:
    scm show status
  6. deliver change-set to stream:
    scm deliver ${cs} -s ${workspace} -t ${stream}
Cheers.

3 votes

Comments

 Thanks a lot for the info - After getting through I shall accept this answer 

 Could you please let us know how we can create a workspace using RTC CLI as we dont have the GUI. 

Did you read the help I linked? The answer is there.

Cheers.

1 vote

thanks we were able to follow the below steps.




Permanent link

 1. Logged into the SCM repository

2. List the streams which I have access to
3. Created a Workspace.
4. Created a new component.
5. Added a new file (abc.jar) into the component created
6. Performed the checkin activity.
7. Tried to deliver to the target stream.

During deliver activity we are getting a warning saying

Syntax used - ./scm.sh deliver --source userWorkspace  --target "RTC Stream Name"


Process Reports:
  Name: Deliver
  Participant Reports:
    Name: Require Work Items and Comments
      A work item or change request must be associated with the change set.
      At least one of the associated work items must specify that the work is planned for the current iteration.
      At least one of the associated work items must be assigned to you.
Problem running 'deliver':
'Deliver' failed. Preconditions have not been met: A work item or change request must be associated with the change set.
<title></title>

0 votes

Comments

Deliver operation failed because target stream belongs to a project area where is set a participant operation named "Require Work Items and Comments" which requires a work-item associated to the change-set you are delivering.

Cheers.

1 vote

Is there a way to create new work item then associate it with the change-set via RTC CLI 

    

You can add a work item to a change-set as described on the help page but you cannot create a new work item via SCM tools.

Cheers.

1 vote


Permanent link

Thanks for the info and we could pass the syntax error and run the commands


Now the question comes with respect to change set id. When ever we do a check action a unique change set id will be generated.

How to capture the new change set id automatically.

0 votes


Permanent link

 Below is the list of tested commands.


./scm.sh login -r https://rational:9443/ccm -n NCB_DEVOPS_SCM -u username -P password      (Logging into RTC)

./scm.sh -a y list streams -r https://rational:9443/ccm     (Listing the streams for which you have permission)

./scm.sh create workspace -r https://rational:9443/ccm  userWorkspace1 -s "ABC_DEVOPS_SCM Stream"   (Creating your Workspace)

./scm.sh create component "ledger" "ABC_DEVOPS_SCM Stream" -r https://rational:9443/ccm  (Creating a Component under the stream)
Component (1021) "ledger" successfully created.

./scm.sh add component -r https://rational:9443/ccm userWorkspace1 1021   (Adding this component to your workspace)
Following components successfully added:  (1021) "ledger"

./scm.sh share -r https://rational:9443/ccm  userWorkspace1 1021 ledger.jar  (for testing have created a ledger.jar file locally and added it to the component)
Shared successfully

./scm.sh checkin ledger.jar  (Performed the check in operation)

./scm.sh add wi <change set id> <work item ID>  (Associating a change-set with a work item)

./scm.sh deliver --source userWorkspace1 <component ID> --target "ABC_DEVOPS_SCM Stream"   (finally trying to deliver)

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 1,381

Question asked: Sep 26 '17, 4:14 a.m.

Question was seen: 4,284 times

Last updated: Oct 06 '17, 3:53 p.m.

Confirmation Cancel Confirm