It's all about the answers!

Ask a question

lscm tools documentation needed


Y.C. Yeung (1111) | asked Mar 04 '14, 5:05 p.m.
retagged Mar 13 '14, 9:13 a.m. by Ralph Earle (25739)

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


Comments
1
Shashikant Padur commented Mar 04 '14, 10:12 p.m.
JAZZ DEVELOPER

One answer



permanent link
Lily Wang (4.9k714) | answered Mar 04 '14, 6:08 p.m.
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

Your answer


Register or to post your answer.