Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Build scripts fails via RTC build definition but passes when invoked manually.

 I have a .CMD file which when run on build server, works perfectly fine.

I have now created a RTC build definition in which i am trying to call the above .cmd file.
When i am requesting a personal build using above build definition, it fails with this error

Trouble initializing at D:\RTCsandbox2\XX\build....\Build\Engine\Src\ScmExec.pl line 427
Error: Unable to initialize file
Can't open perl script ".\YY\ZZ.pl": No such file or directory
Developer build script finished with errors
Build failed. Exit value was 1.

When i checked build scripts, it seems to be trying to set environment variable and may be unable to do so, resulting in not able to find files. This is happening when invoking build scripts via RTC build definition.
Manually it works fine. 
Any pointers will be helpful, thanks in advance.

0 votes


Accepted answer

Permanent link

I believe this issue is similar to this post.
https://jazz.net/forum/questions/236871/how-to-specify-the-build-script-directory

Basically, if your script calls other scripts using relative paths, you need to make sure the current working directory is the correct one.

Kamal Sharma selected this answer as the correct answer

0 votes

Comments

 Thanks Donald Nong. As you informed, My RTC Build definition was not pointing to correct working directory. Working fine now. thanks again.



One other answer

Permanent link

From the information you provided, I could not see why the error is related to the environment variable. Is the full path of the perl script ".\YY\ZZ.pl" set by an environment variable?
In that case, you may add some debug in your build script to check if the environment variable is set properly. You can also add a build property in the build definition and configure the "Environment variables" in the "Command Line" tab of the build definition.

0 votes


Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 16 '17, 1:56 a.m.

Question was seen: 2,049 times

Last updated: Mar 20 '17, 3:40 a.m.

Related questions
Confirmation Cancel Confirm