Command Line Working Directory

I am trying to set up a command line runner in TC 2.1.1 which (remotely) executes a build script which is located in a subdirectory of the build working directory and which needs to be executed in this subdirectory. When I'm using something like the following as Command executable

%build.working.dir%\src\myScript

and leave the Build working directory field empty, the script is executed - only in the wrong directory (presumably %build.working.dir%). Entering relative paths like 'src' or '%build.working.dir%\src' as Build working directory results in the project sources being checked out in the installation directory of the TC Build Agent on the remote machine. I cannot use an absolute path either because the work base directory is specific to the individual agents I am using. And, in fact, I don't want to change the overall build working directory but only the working directory for this individual script, so I think to achieve this an additional Command executable working directory parameter is required. Or is there any other way?

1 comment

Thomas,

As you discovered, build working directory is a directory which is used to checkout the sources. Currently, TeamCity always runs build scripts with this directory set as current.

You probably need the feature filed as http://www.jetbrains.net/jira/browse/TW-2847
Please vote for/watch it.

The current workaround is to modify the build script: first to change to the required directory and then perform the main tasks.

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.