1

I am trying to write a post-push script to trigger Git polling in Jenkins. If I create a 'pre-push' script, the polling is triggered, but when I change it to a'post-push' nothing happens. I have also tried using 'update' and 'post-update'. I am using TortoiseGit and my repo is hosted in GitBlit. I have included the content of my script below:

#!/bin/sh $(curl <Jenkins URL>/notifyCommit?url=<repo URL>)

foxyblue
  • 2,859
  • 2
  • 21
  • 29
Laura
  • 11
  • 2
  • Related: https://stackoverflow.com/questions/9038616/git-post-push-hook It seems that there is no post-push hook. Confirmed by `man githooks`. Are you using github / gitlab? – hfhc2 Nov 07 '17 at 13:09
  • I'm not using GitHub my repo is hosted in GitBlit. According to the following link post-commit is a valid Git hook but maybe its become obsolete? https://git-scm.com/docs/githooks#_post_commit – Laura Nov 07 '17 at 14:58
  • Every push in one repo is received by another. Maybe your answer is [post-receive hook](https://git-scm.com/docs/githooks#post-receive) but, obviusly, you have to configure this in the remote repo where you are sending the push. – Joao Vitorino Nov 07 '17 at 15:17
  • Thanks Joao, I think you might be right. I don't suppose you have any idea how to do this with GitBlit? I haven't been able to find much helpful documentation on it – Laura Nov 07 '17 at 15:50

0 Answers0