Jenkins 2.32.1, all plugins updated to latest versions today. I had this problem with somewhat older versions of plugins so I don't think it's just a recent plugin bug.
My project builds fine when I ask it to in the Jenkins UI. It also builds fine when I configure it to poll. However, I can't get it to build triggered by pushing to Github.
In my project's configuration,
- "Github project" is checked and the URL (https://github.com/myorg/myrepo/) is entered below that
- "Build when a change is pushed to GitHub" is checked
- and then there is
On the Github side, I have
Webhook deliveries are successful, i.e. return HTTP status 200.
On https://jenkins.myorg.com/job/api/GitHubPollLog/ I see
Last GitHub Push
Started on Jan 11, 2017 10:33:41 PM
Using strategy: Default
[poll] Last Built Revision: Revision ee4b3fe5b57ecd5ae5875bce573b32bb60074dfa (refs/remotes/origin/master)
using GIT_SSH to set credentials
> git ls-remote -h git@github.com:myorg/myrepo.git # timeout=10
Found 2 remote heads on git@github.com:myorg/myrepo.git
Using strategy: Default
[poll] Last Built Revision: Revision ee4b3fe5b57ecd5ae5875bce573b32bb60074dfa (refs/remotes/origin/master)
using GIT_SSH to set credentials
> git ls-remote -h git@github.com:myorg/myrepo.git # timeout=10
Found 2 remote heads on git@github.com:myorg/myrepo.git
Done. Took 2 sec
No changes
The "last built revision" lines do indeed say the SHA of the revision that was most recently built (manually). But there are changes, because I just pushed a bogus update for testing purposes.
In Jenkins' main log I see
Jan 11, 2017 10:33:41 PM INFO
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent
Received POST for https://github.com/myorg/myrepo
Jan 11, 2017 10:33:41 PM INFO
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber$1 run
Poked api
and nothing more.
I know similar questions have been asked many times. I've checked all of the considerations mentioned in
- Jenkins-Build when a change is pushed to GitHub option is not working
- How to trigger a Jenkins build when a push is made to a private github repository
without success and read many others without getting any other insight. Any suggestions?