The situation is, the batch command file containing execution with omake.exe is located in an clearcase view. Calling this bat file from dos command window works quite fine, but if I call the same bat file from Jenkins job, I get following error message:
Started by user XXXXXXX
[EnvInject] - Loading node environment variables.
Building in workspace C:\app\tools\Jenkins\jobs\workspace
[workspace] $ cmd /c call C:\WINDOWS\TEMP\hudson7938450600036163921.bat
C:\app\tools\Jenkins\jobs\workspace>cleartool startview Z000000_Latest
C:\app\tools\Jenkins\jobs\workspace>subst Y: X:\Z000000_Latest
C:\app\tools\Jenkins\jobs\workspace>cd /d "Y:\prj_cfg"
Y:\prj_cfg>omake Y:\source\sw\sw_main.cpp
omake: Error: Unable to start build session for view "Z000000_Latest" - Permission denied
omake: command line: Unable to get bldcm session handle
. Stop.
Y:\prj_cfg>exit 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Any one has an idea? Thanks
The main reason for a difference between a failed Jenkins job and a successful batch session is the environment variable (not to mention the user might be different).
For instance, the CLEARCASE_PRIMARY_GROUP
environment variable might be different (or not set at all) in the Jenkins job session, as opposed to the batch session.
Compare the result of the 'set
' command in both cases to sport the differences and test which one might matter.