PDA

View Full Version : Accessing StarTeam repository


ChrisF
12-16-2009, 04:18 PM
VBPro v7.2

Since VBPro does not have have native support for StarTeam, I'm having to create a Run Program step to issue command-line StarTeam commands. The command-line is

stcmd.exe co -p "username:password@host:port/project"

I put the username and password in the Advance tab, and now my command line is same as above, except without the username:password@ part.

I get an invalide username or password error. The Subversion example only shows access to a local repository, but I need access to a remote one.

kinook
12-16-2009, 04:22 PM
The username/password field on the Advanced tab specify the Windows user credentials that the process will run under.
http://www.kinook.com/VisBuildPro/Manual/programadvancedtab.htm

The StarTeam username/password must be passed on the command-line to stcmd. Use the built-in StarTeam action.
http://www.kinook.com/VisBuildPro/Manual/starteam.htm

ChrisF
12-17-2009, 10:32 AM
I'm using command line StarTeam and have looked at the Subversion example since the syntax is similar, but it only uses a local repository.

I want to checkout code using Run Program with StarTeam command line, which needs a username and p/w. How can I use the supplied username and password I enter in the Advance tab for this purpose?

kinook
12-17-2009, 11:21 AM
See above.

ChrisF
12-17-2009, 03:13 PM
Yes thanks! After I read the manual I saw the same example, and realized I was looking at the Version Control area instead of the Borland area for the built-in StarTeam action. How can I tell the action, or VBPro where the StarTeam executable is (stcmd.exe)?

kinook
12-17-2009, 03:17 PM
http://www.kinook.com/VisBuildPro/Manual/staropttab.htm

ChrisF
12-17-2009, 03:45 PM
Ok way down at the bottom. Now I get "the system can not find the path specified". I have too many paths in this action, which one is it? Server path, project path, project file path, local path? I'm double-checking my paths now.

kinook
12-17-2009, 03:49 PM
If the error was

Failed to create process: The system cannot find the file specified.

Windows couldn't find stcmd.exe. Check the 'Log the command-line' option on the Advanced tab and rebuild the step to see the full command-line that was used.

ChrisF
12-17-2009, 05:35 PM
Thanks I'm getting there. Any way to turn on a more verbose mode so I can see which step along the way fails?

ChrisF
12-18-2009, 09:17 AM
I see that I'm executing the correct command, but am getting this error. <hostname> contains the actual hostname, without the <>.

Error occurred:
<hostname>


Process completed with exit code 1
12/18/2009 9:03:03 AM: Step '24 - Test' failed
12/18/2009 9:03:03 AM: Build ended.

ChrisF
12-18-2009, 09:33 AM
I got it! I needed to put the fully-qualified server name since it was on a different domain.

hostname.mydomani.org instead of just hostname.

THANK YOU!!!

ChrisF
12-18-2009, 09:42 AM
Well I thought I did have it.

I see the logs saying "blah blah checkedout" and then I get this.

Process completed with exit code 1
12/18/2009 9:34:03 AM: Step '24 - Test' failed
12/18/2009 9:34:03 AM: Build ended.

When I execute the command on Win command prompt, I don't get the error.

kinook
12-18-2009, 11:26 AM
When running a program in a Command Prompt, the process exit code is ignored. By default, VBP checks the process exit code and fails the step if it's not zero.

According to the Borland StarTeam 2009 StarTeam Command-Line Tools Help, Exit Codes section (page 38):

"The stcmd commands return exit codes if the -x option is used in the command. The codes are: 0 for success, 1
for failure, 101 if at least one of the specified file patterns did not match, 102 if none of the specified file patterns
matched. The stcmd diff command has an additional option (-e) that returns exit codes. The -e option has three
exit codes (0, 1, and 2) with meanings that are different from those listed above. In addition, the 1 might not be
returned if you don’t also use the -x option."

If it's actually succeeding but returning an exit code of 1, you can either uncheck the Batch mode option on the Global Options tab (to remove the -x option) or mark the step to continue building on failure (More tab). You may also want to report the issue to Borland. You can check the 'Log the command-line...' checkbox on the Advanced tab and rebuild the step to determine and provide the full stcmd.exe command with your support incident.

ChrisF
12-18-2009, 11:59 PM
Thanks. Where is the StarTeam command line manual you mention, is it on the VBPro help section on StartTeam? One thing I don't like about that company is the lack of support, unlike Kinook.

kinook
12-19-2009, 12:19 AM
I believe the StarTeam client installer includes ST_CmdTools_Help_en.pdf file, which contains the documentation for the command-line app.

ChrisF
12-21-2009, 03:54 PM
I looked in our installation to no avail.

kinook
12-21-2009, 04:07 PM
You can download the document from http://www.kinook.com/Download/Temp/ST_CmdTools_Help_en.zip