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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -