github - Jenkins build is not triggered with git post-receive hook -
github - Jenkins build is not triggered with git post-receive hook -
i have installed jenkins on windows machine, configured project git repo. goal automatically build project when commits github. accomplish goal, updated "post-receive" (no extn) file under .git/hooks directory. code looks this
#!/bin/bash curl http://localhost:9090/job/myproject/build?token=mytoken
when execute curl http://localhost:9090/job/myproject/build?token=mytoken
command or sh post-receive
, jenkins job trigger.
jenkins job not triggered when force changes git repo (from machine). kindly share thoughts help me resolve issue.
first, github supports webhooks, not post-receive hooks.
you can configure webhooks in github repository settings: github.com/[owner]/[repository]/settings/hooks
however, if you're trying fire off jenkins job, should existing services hooks jenkins.
git github jenkins
Comments
Post a Comment