I am in need of an urgent help and any guidance from anyone out there would be really appreciated.
Please find below the USE-CASE that I am trying to accomplish here:
I have a Java-package which is checked in GIT (and code.amazon.com) and I have a ANT job to trigger the package.
Within the ANT job, I have created a macrodef for GIT and I am performing a GIT FETCH and GIT RESET so that I can get the latest codebase every time I am triggering the ANT JOB.
When I am triggering the ANT job using ECLIPSE, it is working.
If I am running the ANT job from terminal using “ANT –buildfile my_buildfile.xml”, it is also working.
Now I have setup JENKINS on my machine and am trying to run the ANT file. Jenkins is not able to trigger the GIT job in the ANT file. It is giving following error.
/rhel5pdi/workplace/bangshis/EpubYJConvPerfWorkspace/src/EpubYJConvPerfLinux/Jenkins_Linux_build_Global.xml:81: The following error occurred while executing this line:
/rhel5pdi/workplace/bangshis/EpubYJConvPerfWorkspace/src/EpubYJConvPerfLinux/Jenkins_Linux_build_Global.xml:99: Execute failed: java.io.IOException: Cannot run program “git”: error=2, No such file or directory
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
Part of this error might be due to the reason that, my JENKINS is not able to trigger the JOB as the current user of the HOST MACHINE.
To solve this problem, I have tried taking the following steps:
1. Creating a Global credential and using PASSWORD less account (RSA ID).
2. Logging into JENKINS using the same user name as system.
3. Installing GIT and GIT CLIENT plugins and setting them up appropriately.
Kindly let me know if I am missing some, and if there is any way out. If my approach is not correct, I would be glad if you can share few other ideas.