1

I was experimenting with eclipse and Jenkins but something I am missing here that's why while I am committing the code to local git from eclipse Jenkins build job is not triggering. While I am adding and commit it from command line that build job is running fine. But I want the same when I am committing it from eclipse.

Can you please let me know what I need to do to make it work ?

Here what I am doing :-

  1. I have a sample project where I am making the change and committing to a local git repository

  2. I have created a post-commit hook script under the hook .git/hook

  3. created a jenkin maven project with the details

  4. making a change and code and committing it from Eclipse > Project > Team > Commit

Result: no build job started in Jenkin

MWiesner
  • 8,868
  • 11
  • 36
  • 70
r-developer
  • 517
  • 1
  • 8
  • 21
  • What Eclipse/JGit version are you using? post-commit support is in 4.5: https://github.com/eclipse/jgit/commit/57a263f1823d164142235a72072154f0568cb61c since sept. 2016. – VonC Feb 04 '18 at 06:10
  • @VonC I am using Eclipse - Oxygen with Egit 4.6 and git 2.16 is installed in my machine – r-developer Feb 04 '18 at 06:13
  • Are your sources duplicated in the Eclipse workspace, or are they referencing the local actual git repo path. – VonC Feb 04 '18 at 06:15
  • whole project is in local git repo – r-developer Feb 04 '18 at 06:16
  • Is the hook executed at all when committing on Eclipse? I mean, if you add an echo at the beginning of the script, do you see it? – VonC Feb 04 '18 at 06:18
  • can you please where I will able to see if Eclipse is calling this script or not ? As I am not able to see any message in eclipse after committing, so not sure if it is calling that script or not – r-developer Feb 04 '18 at 06:21
  • The eclipse console should display something (https://stackoverflow.com/q/11112670/6309) – VonC Feb 04 '18 at 06:40
  • no I can not see anything on the console. so I guess it's not calling the script. do I need to configure anything for this ? git.exe, sh.exe,bash.exe path is set in environmental variable as per https://stackoverflow.com/questions/32440968/hook-is-not-working-eclipse-egit-client but still no luck. – r-developer Feb 04 '18 at 06:45

0 Answers0