how to specify the build script directory
Hi,
I'm using RTC 5.0.2 with command-line - jazz build engine and the build system toolkit on a windows machine.
My project is loaded to the build machine on the "build" directory and my build script is in a subfolder named "script".
How do i specify the path to my build script ?
When I specify the command line "${scriptDir}\build.bat" it find the script but I need to "cd" in this "scriptdir" subfolder before running the script.
I try setting the working directory to the "$scriptDir" directory and changing my command line to "build.bat" but the build fail with "java.io.IOException: Cannot run program "build.bat" (in directory "build\script"): CreateProcess error=2, Le fichier spécifié est introuvable."
I don't understand because the script file is in that "build\script" directory.
2 answers
How about changing the working directory in your build.bat?
http://stackoverflow.com/questions/5138507/how-to-change-current-working-directory-using-a-batch-file
If you want to know what is the current working directory in the batch file, see below post.
http://stackoverflow.com/questions/4419868/what-is-the-current-directory-in-a-batch-file
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 16 '17, 9:41 a.m.From your explanation I can not tell what you are doing. I can guess a lot, but that does not make sense. Please explain what you have set up and how e.g. build definition etc.
antoine robic
Mar 16 '17, 11:15 p.m.Ok, I'll try to be more explcit.
I'm Trying to set up continous integration for my project and I'm trying to use rational team concert build to do it.
I created a sample hello world C project with a build.bat script to compile the code.
Sources files are in "src" subfolder and the script file is in"script" subfolder.
I push the code to a repository workspace on the jazz source control then deliver changes to a dedicated stream.
I read the rational team conert build documentation at https://www.ibm.com/support/knowledgecenter/en/SSYMRC_5.0.2/com.ibm.team.build.doc/topics/t_build_overview.html and follow the instructions.
I installed the build system toolkit, create a dedicated build workspace, a jazz build engine, and a "command line - jazz build engine" build definition.
I started the build engine.
In the build definition, I created properties like that :
I configured the build definition with the jazz source control, specify the dedicated build workspace, and the load directory with ${loadDir} .
It can not find the file although it is there !Then in the command line tab, when I set the command field to "${scriptDir}\build.bat", It's working, the build script is called.
But I want to call the script from the ${scriptDir} and not from the build engine root directory.
So the question is : "how to call the build script from his own directory : {$scriptDir}" ?
I tried many things like setting the working directory to {$scriptDir} and command line to build.bat was the right way to do it. But in that case, I get the following error :
I also tried to use absolute path instead of relative path but it's not working either.
I'm using rational team concert 5.0.2 with the eclipse client on a windows 7 machine.
Hope that is clear enought