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

lscm tools documentation needed

I am writing a script to check in files to RTC.  I need to know the return code from the command to detect errors from the commands.  I also need to know the json structure to parse out information from the result of the commands (share, checkin, deliver).

Is there (GOOD) documentation on the lscm tools?

I have searched the jazz.org and only find syntax about the commands and not any information on any return code and error handling for the commands.

Here is my script.

#!/usr/bin/env bash
## this script needs bash and the GNU grep in the beginning of search path
## need to use ticktick.sh from https://github.com/kristopolous/TickTick
. ticktick.sh
date
## copy changed files to the export directory
ant/bin/ant -f build.xml export
cd export
date
host=`hostname`
echo $host
export JAVA_HOME=/opt/IBM/mqsi/8.0/jre16
export RTC_SCRIPT_BASE=/apps/wmqtools/jazz/scmtools/eclipse/scripts
## login to RTC
/apps/wmqtools/jazz/scmtools/eclipse/lscm login -r https://rational.test.org/ccm2 -u user_id -P password -n rtcprod
date
## check in the new files using the share command
share_rslt=`/apps/wmqtools/jazz/scmtools/eclipse/lscm share -r rtcprod -j -v "${host}_ws_ees" "${host}" *`
echo $share_rslt > ../rtc_backup_share_rslt.json
tickParse "$share_rslt"
set > ../rtc_backup_share_rslt_set.txt
echo share uuid : ``changes_000000000000_uuid``
echo changes\[0\].uuid: ``changes[0].uuid``
date
## check in the changed files using the checkin command
chkin_rslt=`/apps/wmqtools/jazz/scmtools/eclipse/lscm checkin . --json`
date
echo $chkin_rslt > ../rtc_backup_chkin_rslt.json
# parse the result using ticktick function tickParse
# the change set uuid is __tick_data_000000000000_components_000000000000_outgoing45changes_000000000000_uuid
##  or ``000000000000.components[0].outgoing-changes[0].uuid``
tickParse "$chkin_rslt"
chgsetid=``000000000000.components[0].outgoing-changes[0].uuid``
echo Change set uuid is $chgsetid
/apps/wmqtools/jazz/scmtools/eclipse/lscm changeset comment "$chgsetid" "Update from $host"
date
/apps/wmqtools/jazz/scmtools/eclipse/lscm deliver "$chgsetid"
date

0 votes

Comments

1 vote



One answer

Permanent link
For the scm/lscm exit code, you can find from http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.team.scm.doc/topics/r_scm_cli_retcodes.html

1 vote

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: Mar 04 '14, 5:05 p.m.

Question was seen: 6,164 times

Last updated: Mar 13 '14, 9:13 a.m.

Confirmation Cancel Confirm