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
Comments
Shashikant Padur
JAZZ DEVELOPER Mar 04 '14, 10:12 p.m.As of now there is no documentation on the JSON output format. Here is the link to couple of scm cli articles:
1 vote